mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 11:50:02 +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
@@ -19,7 +19,7 @@ module.exports = function CropModule(options, UI) {
|
||||
// add our custom in-module html ui:
|
||||
if (options.step.inBrowser && !options.noUI) var ui = require('./Ui.js')(options.step, UI);
|
||||
var output,
|
||||
setupComplete = false;
|
||||
setupComplete = false;
|
||||
|
||||
// This function is caled everytime the step has to be redrawn
|
||||
function draw(input,callback) {
|
||||
@@ -29,8 +29,23 @@ module.exports = function CropModule(options, UI) {
|
||||
// save the input image;
|
||||
// TODO: this should be moved to module API to persist the input image
|
||||
options.step.input = input.src;
|
||||
var parseCoordInputs = require('../../util/ParseInputCoordinates');
|
||||
|
||||
require('./Crop')(input, options, function(out, format){
|
||||
//parse the inputs
|
||||
parseCoordInputs.parseCornerCoordinateInputs(options,{
|
||||
src: input.src,
|
||||
x: { valInp: options.x, type: 'horizontal' },
|
||||
y: { valInp: options.y, type: 'vertical' },
|
||||
w: { valInp: options.w, type: 'horizontal' },
|
||||
h: { valInp: options.h, type: 'vertical' },
|
||||
}, function (options, coord) {
|
||||
options.x = parseInt(coord.x.valInp);
|
||||
options.y = parseInt(coord.y.valInp);
|
||||
options.w = coord.w.valInp;
|
||||
options.h = coord.h.valInp;
|
||||
});
|
||||
|
||||
require('./Crop')(input, options, function (out, format) {
|
||||
|
||||
// This output is accessible to Image Sequencer
|
||||
step.output = {
|
||||
|
||||
Reference in New Issue
Block a user