Issue #163: show highlighter pixel for selection tools when no selection

This commit is contained in:
Julian Descottes 2016-07-30 12:10:23 +02:00 committed by juliandescottes
parent a383e59280
commit 34f2a9df0b
3 changed files with 5 additions and 7 deletions

View File

@ -8,8 +8,6 @@
ns.AbstractDragSelect = function () { ns.AbstractDragSelect = function () {
ns.BaseSelect.call(this); ns.BaseSelect.call(this);
this.hasSelection = false;
}; };
pskl.utils.inherit(ns.AbstractDragSelect, ns.BaseSelect); pskl.utils.inherit(ns.AbstractDragSelect, ns.BaseSelect);

View File

@ -18,6 +18,7 @@
this.lastMoveRow = null; this.lastMoveRow = null;
this.selection = null; this.selection = null;
this.hasSelection = false;
this.tooltipDescriptors = [ this.tooltipDescriptors = [
{description : 'Drag the selection to move it. You may switch to other layers and frames.'}, {description : 'Drag the selection to move it. You may switch to other layers and frames.'},
@ -95,6 +96,10 @@
this.bodyRoot.removeClass(this.secondaryToolId); this.bodyRoot.removeClass(this.secondaryToolId);
} }
} }
if (!this.hasSelection) {
pskl.tools.drawing.BaseTool.prototype.moveUnactiveToolAt.apply(this, arguments);
}
}; };
ns.BaseSelect.prototype.isInSelection = function (col, row) { ns.BaseSelect.prototype.isInSelection = function (col, row) {
@ -103,10 +108,6 @@
}); });
}; };
ns.BaseSelect.prototype.hideHighlightedPixel = function() {
// there is no highlighted pixel for selection tools, do nothing
};
/** /**
* Protected method, should be called when the selection is dismissed. * Protected method, should be called when the selection is dismissed.
*/ */

View File

@ -8,7 +8,6 @@
ns.ShapeSelect = function() { ns.ShapeSelect = function() {
ns.BaseSelect.call(this); ns.BaseSelect.call(this);
this.hasSelection = false;
this.toolId = 'tool-shape-select'; this.toolId = 'tool-shape-select';
this.helpText = 'Shape selection'; this.helpText = 'Shape selection';