Moar fixed

This commit is contained in:
jdescottes 2014-07-13 21:02:44 +02:00
parent e5f0197170
commit 1692822914
5 changed files with 21 additions and 24 deletions

View File

@ -16065,17 +16065,17 @@ zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License
var cache = this.cache_[namespace]; var cache = this.cache_[namespace];
var cacheKey = frame.getHash(); var cacheKey = frame.getHash();
if (this.cache_[cacheKey]) { if (cache[cacheKey]) {
processedFrame = this.cache_[cacheKey]; processedFrame = cache[cacheKey];
} else { } else {
var frameAsString = JSON.stringify(frame.getPixels()); var frameAsString = JSON.stringify(frame.getPixels());
if (this.cache_[frameAsString]) { if (cache[frameAsString]) {
processedFrame = this.outputCloner(this.cache_[frameAsString], frame); processedFrame = this.outputCloner(cache[frameAsString], frame);
} else { } else {
processedFrame = this.frameProcessor(frame); processedFrame = this.frameProcessor(frame);
this.cache_[frameAsString] = processedFrame; cache[frameAsString] = processedFrame;
} }
this.cache_[cacheKey] = processedFrame; cache[cacheKey] = processedFrame;
} }
return processedFrame; return processedFrame;
}; };
@ -21762,11 +21762,17 @@ zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License
{key : 'shift', description : 'Apply only once per pixel'} {key : 'shift', description : 'Apply only once per pixel'}
]; ];
this.resetUsedPixels_(); this.usedPixels_ = {
darken : {},
lighten : {}
};
}; };
pskl.utils.inherit(ns.Lighten, ns.SimplePen); pskl.utils.inherit(ns.Lighten, ns.SimplePen);
/**
* @Override
*/
ns.Lighten.prototype.resetUsedPixels_ = function() { ns.Lighten.prototype.resetUsedPixels_ = function() {
this.usedPixels_ = { this.usedPixels_ = {
darken : {}, darken : {},
@ -21774,8 +21780,9 @@ zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License
}; };
this.superclass.resetUsedPixels_.call(this); this.superclass.resetUsedPixels_.call(this);
}; };
/** /**
* @override * @Override
*/ */
ns.Lighten.prototype.applyToolAt = function(col, row, color, frame, overlay, event, mouseButton) { ns.Lighten.prototype.applyToolAt = function(col, row, color, frame, overlay, event, mouseButton) {
var overlayColor = overlay.getPixel(col, row); var overlayColor = overlay.getPixel(col, row);
@ -21806,16 +21813,6 @@ zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License
} }
}; };
ns.Lighten.prototype.releaseToolAt = function(col, row, color, frame, overlay, event) {
this.setPixelsToFrame_(frame, this.pixels);
$.publish(Events.PISKEL_SAVE_STATE, {
type : pskl.service.HistoryService.SNAPSHOT
});
this.resetUsedPixels_();
};
})();;(function() { })();;(function() {
var ns = $.namespace("pskl.drawingtools"); var ns = $.namespace("pskl.drawingtools");

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
(function () { (function () {
/** /**
* See @Gruntfile.js => after build, -2014-07-13-06-27 is replaced by the build version * See @Gruntfile.js => after build, -2014-07-13-09-02 is replaced by the build version
*/ */
var version = '-2014-07-13-06-27'; var version = '-2014-07-13-09-02';
var versionHasNotBeenReplaced = version.indexOf('@@') === 0; var versionHasNotBeenReplaced = version.indexOf('@@') === 0;
if (versionHasNotBeenReplaced) { if (versionHasNotBeenReplaced) {
version = ''; version = '';