Fixed size related issues. Selection Manager no longer depends on the frameoverlay which is now only manipulated by the tools

This commit is contained in:
jdescottes
2013-08-05 23:34:11 +02:00
parent 9a68da8bda
commit 1977141076
10 changed files with 92 additions and 87 deletions

View File

@ -24,11 +24,14 @@
ns.ShapeSelect.prototype.onSelectStart_ = function (col, row, color, frame, overlay) {
// Clean previous selection:
$.publish(Events.SELECTION_DISMISSED);
overlay.clear();
// From the pixel cliked, get shape using an algorithm similar to the paintbucket one:
var pixels = pskl.PixelUtils.getSimilarConnectedPixelsFromFrame(frame, col, row);
var selection = new pskl.selection.ShapeSelection(pixels);
$.publish(Events.SELECTION_CREATED, [selection]);
this.drawSelectionOnOverlay_(selection, overlay);
};
})();