-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bring callback toapplyfilters #3210
Conversation
great :) |
@@ -62,6 +62,9 @@ | |||
* @param {Number} scaleY | |||
*/ | |||
applyTo: function(canvasEl, scaleX, scaleY) { | |||
if (scaleX === 1 && scaleY === 1) { | |||
return; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make filter exit if we want have a bigger image than original.
The resize filter is meant for downscaling and too slow to be used as upscaler. There are no added details
@@ -296,7 +319,7 @@ | |||
* @return {String} Source of an image | |||
*/ | |||
getSrc: function() { | |||
var element = this.getElement(); | |||
var element = this._originalElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_element could be a replacement from filtering where src is no more meaningfull
Hi there, It seems like this commit changes something in a major way - the way we serialize and send the canvas as svg using toSVG method, when there are filters applied.
Is this the intended behavior? If yes, then how should one work with filters? |
no, is not intended behaviour, i did not touch the export toSVG function but maybe the getSrc function changes are implied. Probably we do not have the test for it. Please open an issue with the latest version, a small clear fiddle with the related code and i will fix it asap. |
Thanks a lot for your cooperation! |
to solve load from json issues and apply filters, both normal and dynamic resize.
Also take in consideration retina when scaling down the image so that crispness is preserved.
Added a parameter to do not scale over a factor of 0.5
closes #365