mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix selection paste transparent pixels
This commit is contained in:
@@ -19,7 +19,6 @@
|
|||||||
$.subscribe(Events.SELECTION_MOVE_REQUEST, $.proxy(this.onSelectionMoved_, this));
|
$.subscribe(Events.SELECTION_MOVE_REQUEST, $.proxy(this.onSelectionMoved_, this));
|
||||||
|
|
||||||
pskl.app.shortcutService.addShortcut('ctrl+V', this.paste.bind(this));
|
pskl.app.shortcutService.addShortcut('ctrl+V', this.paste.bind(this));
|
||||||
pskl.app.shortcutService.addShortcut('ctrl+shift+V', this.pasteOpaqueOnly.bind(this));
|
|
||||||
pskl.app.shortcutService.addShortcut('ctrl+X', this.cut.bind(this));
|
pskl.app.shortcutService.addShortcut('ctrl+X', this.cut.bind(this));
|
||||||
pskl.app.shortcutService.addShortcut('ctrl+C', this.copy.bind(this));
|
pskl.app.shortcutService.addShortcut('ctrl+C', this.copy.bind(this));
|
||||||
pskl.app.shortcutService.addShortcut('del', this.erase.bind(this));
|
pskl.app.shortcutService.addShortcut('del', this.erase.bind(this));
|
||||||
@@ -92,13 +91,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ns.SelectionManager.prototype.paste = function() {
|
ns.SelectionManager.prototype.paste = function() {
|
||||||
if(this.currentSelection && this.currentSelection.hasPastedContent) {
|
|
||||||
var pixels = this.currentSelection.pixels;
|
|
||||||
this.pastePixels(pixels);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ns.SelectionManager.prototype.pasteOpaqueOnly = function() {
|
|
||||||
if(this.currentSelection && this.currentSelection.hasPastedContent) {
|
if(this.currentSelection && this.currentSelection.hasPastedContent) {
|
||||||
var pixels = this.currentSelection.pixels;
|
var pixels = this.currentSelection.pixels;
|
||||||
var opaquePixels = pixels.filter(function (p) {
|
var opaquePixels = pixels.filter(function (p) {
|
||||||
|
|||||||
Reference in New Issue
Block a user