mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Issue #215 : Fix cursor coordinates regression
This commit is contained in:
@@ -32,12 +32,12 @@
|
|||||||
overlay.clear();
|
overlay.clear();
|
||||||
$.publish(Events.SELECTION_DISMISSED);
|
$.publish(Events.SELECTION_DISMISSED);
|
||||||
} else {
|
} else {
|
||||||
this.startSelection_();
|
this.startSelection_(col, row);
|
||||||
overlay.setPixel(col, row, color);
|
overlay.setPixel(col, row, color);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.RectangleSelect.prototype.startSelection_ = function (col, row, color) {
|
ns.RectangleSelect.prototype.startSelection_ = function (col, row) {
|
||||||
this.hasSelection = true;
|
this.hasSelection = true;
|
||||||
$.publish(Events.DRAG_START, [col, row]);
|
$.publish(Events.DRAG_START, [col, row]);
|
||||||
// Drawing the first point of the rectangle in the fake overlay canvas:
|
// Drawing the first point of the rectangle in the fake overlay canvas:
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
*/
|
*/
|
||||||
ns.RectangleSelect.prototype.onSelect_ = function (col, row, color, frame, overlay) {
|
ns.RectangleSelect.prototype.onSelect_ = function (col, row, color, frame, overlay) {
|
||||||
if (!this.hasSelection && (this.selectionOrigin_.col !== col || this.selectionOrigin_.row !== row)) {
|
if (!this.hasSelection && (this.selectionOrigin_.col !== col || this.selectionOrigin_.row !== row)) {
|
||||||
this.startSelection_();
|
this.startSelection_(col, row);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hasSelection) {
|
if (this.hasSelection) {
|
||||||
|
|||||||
Reference in New Issue
Block a user