angularjs - Image Resize tool broken on relaunch of Adobe Creative SDK Image Editor for Web -
i'm using adobe creative sdk image editor ui component web (v4.2.1), integrated single page application built on angular 1.5.
i have gallery of assets. when select asset , launch editor , go resize tool, works first time. if relaunch editor same or other asset, resize tool fails detect image's dimensions, instead defaulting 640x480 "maintain proportions" icon unlocked. attempts lock proportions or alter dimensions , 'apply' don't anything. no errors. other tools aside "resize" continue work expected.
here functions inside directive. editor instantiated in index.html document.
var launcheditor = function(id, src, mimetype) { var fileextension = null; if(mimetype && mimetype == "image/jpeg") { fileextension = "jpg"; } window.adobeeditor.launch({ image: id, url: src, noclosebutton: true, displayimagesize: true, fileformat: fileextension, maxsize: 2500, onsavebuttonclicked: function(imageid) { }, onsave: function(imageid, newurl) { $timeout(function(){ $debug.log({"imageid":imageid, "newurl":newurl}, "adobeeditor onsave"); $scope.selectedassetsrc = newurl; //wipe existing list because we're going refresh $scope.assets = []; $scope.showspinner = true; saveeditedimage(imageid, newurl); if($scope.editonly) { $debug.log("assetlist - done editing - emit close modal"); } window.adobeeditor.close(); }) }, onerror: function(errorobj) { $debug.warn(errorobj, "adobeeditor onerror"); }, onclose: function(isdirty){ $debug.log("adobeeditor onclose"); }, onready: function(){ $debug.log("adobe editor onready"); } }); return false; } $scope.doeditasset = function() { $scope.showeditasset = true; return launcheditor("selectedimagetoedit", $scope.selectedassetsrc, $scope.selectedassetmimetype); }; $scope.canceleditasset = function() { window.adobeeditor.close(); $scope.showeditasset = false; };
and here container i'm dynamically hooking image file in view:
<div id="imageeditorwrapper"><img style="display: none" id="selectedimagetoedit" ng-src="{{selectedassetsrc}}" /></div>
and button launches editor:
<button class="button tiny primary" ng-click="doeditasset()"><span data-icon=""> {{"assets.edit_image" | localetext:"edit image"}}</span></button>
any ideas what's going wrong or bug on plugin's end?
Comments
Post a Comment