mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 20:00:05 +01:00
Added a function to sequencer and then made the functionality available to crop and overlay module. (#592)
* Add manifest.json and cache static assets for offline use (#331)
* Add manifest.json
* cache static assets for offline use
* update cache
* add meta theme-color and change static files to be cache
* cache the files on network request
* caching on first run
Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
* add a button to clear cache
* add styling to clear cache link
* Update Modules.js (#452)
I've arranged the modules in alphabetical order.
* Added a function to parse Input coordinates and added the functionality for crop and overlay modules
* Added changed dist files
* Revert "Added changed dist files"
This reverts commit dbda25a228.
* Changed function name and added the functionaity to src/utils folder
* Added unit test
* Added unit test to /test/util
This commit is contained in:
committed by
Jeffrey Warren
parent
b520622bfd
commit
aad1f823d3
17
test/util/parse-input.js
Normal file
17
test/util/parse-input.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var test = require('tape');
|
||||
|
||||
var red = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAABgj/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABykX//Z";
|
||||
|
||||
var parseCornerCoordinateInputs = require('../../src/util/ParseInputCoordinates');
|
||||
|
||||
|
||||
test('parseCornerCoordinateInputs works.', function (t) {
|
||||
var options = { x: '10%' },
|
||||
coord = { src: red, x: { valInp: options.x, type: 'horizontal' } }
|
||||
callback = function (options, coord) {
|
||||
options.x = parseInt(coord.x.valInp);
|
||||
t.equal(options.x, 1, 'parseCornerCoordinateInputs works.');
|
||||
t.end();
|
||||
};
|
||||
parseCornerCoordinateInputs(options, coord, callback);
|
||||
});
|
||||
Reference in New Issue
Block a user