mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
0cdfcfc94d | |||
9c6871effc | |||
2fe1fe67e5 | |||
8867324468 | |||
1bf326fbd8 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "piskel",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"description": "Pixel art editor",
|
||||
"author": "Julian Descottes <julian.descottes@gmail.com>",
|
||||
"contributors": [
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
.main-wrapper {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 5px;
|
||||
right: 0;
|
||||
bottom: 5px;
|
||||
@ -26,6 +26,7 @@
|
||||
vertical-align: top;
|
||||
height: 100%;
|
||||
margin-right: 7px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.main-column {
|
||||
@ -37,6 +38,7 @@
|
||||
box-sizing: border-box;
|
||||
vertical-align: top;
|
||||
height: 100%;
|
||||
flex-shrink: 0;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -238,13 +238,15 @@
|
||||
var evt = jQueryEvent.originalEvent;
|
||||
// Ratio between wheelDeltaY (mousewheel event) and deltaY (wheel event) is -40
|
||||
var delta;
|
||||
if (pskl.utils.UserAgent.isChrome) {
|
||||
delta = evt.wheelDeltaY;
|
||||
} else if (pskl.utils.UserAgent.isIE11) {
|
||||
if (pskl.utils.UserAgent.isIE11) {
|
||||
delta = evt.wheelDelta;
|
||||
} else if (pskl.utils.UserAgent.isFirefox) {
|
||||
delta = -40 * evt.deltaY;
|
||||
} else {
|
||||
delta = evt.wheelDeltaY;
|
||||
}
|
||||
|
||||
delta = delta || 0;
|
||||
var modifier = (delta / 120);
|
||||
|
||||
if (pskl.utils.UserAgent.isMac ? evt.metaKey : evt.ctrlKey) {
|
||||
@ -278,7 +280,7 @@
|
||||
var step = zoomMultiplier * this.getZoomStep_();
|
||||
this.setZoom_(this.renderer.getZoom() + step);
|
||||
|
||||
if (centerCoords) {
|
||||
if (typeof centerCoords === 'object') {
|
||||
var xRatio = (centerCoords.x - off.x) / oldWidth;
|
||||
var yRatio = (centerCoords.y - off.y) / oldHeight;
|
||||
var newWidth = this.getContainerWidth_() / this.renderer.getZoom();
|
||||
|
Reference in New Issue
Block a user