mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Display drawing zoom
This commit is contained in:
parent
2f2b4cd9ba
commit
4ebf43fda4
@ -86,6 +86,12 @@
|
||||
font-family:monospace;
|
||||
}
|
||||
|
||||
.cursor-coordinates .drawing-zoom {
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Canvases layout
|
||||
*/
|
||||
|
@ -17,6 +17,7 @@
|
||||
$.subscribe(Events.DRAG_START, this.onDragStart_.bind(this));
|
||||
$.subscribe(Events.DRAG_END, this.onDragEnd_.bind(this));
|
||||
$.subscribe(Events.FRAME_SIZE_CHANGED, this.redraw.bind(this));
|
||||
$.subscribe(Events.ZOOM_CHANGED, this.redraw.bind(this));
|
||||
|
||||
this.redraw();
|
||||
};
|
||||
@ -39,6 +40,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (pskl.app.drawingController) {
|
||||
var zoom = pskl.app.drawingController.compositeRenderer.getZoom().toFixed(2);
|
||||
html += '<div class="drawing-zoom">x' + zoom + '</div>';
|
||||
}
|
||||
|
||||
this.coordinatesContainer.innerHTML = this.getFrameSizeHTML_() + html;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user