5 Commits

Author SHA1 Message Date
Julian Descottes
0cdfcfc94d release 0.8.3: fix safari zoom issue 2016-10-23 10:04:22 +02:00
juliandescottes
9c6871effc Fix layout issue when starting with small viewport height 2016-08-16 10:33:19 +02:00
juliandescottes
2fe1fe67e5 Fix: flexbox issue on IE11 2016-08-16 10:06:42 +02:00
juliandescottes
8867324468 Fix zoom centering when zooming with keyboard shortcuts 2016-08-16 09:53:14 +02:00
juliandescottes
1bf326fbd8 release: set version to 0.9.0-SNAPSHOT 2016-08-16 01:43:26 +02:00
3 changed files with 10 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "piskel", "name": "piskel",
"version": "0.8.2", "version": "0.8.3",
"description": "Pixel art editor", "description": "Pixel art editor",
"author": "Julian Descottes <julian.descottes@gmail.com>", "author": "Julian Descottes <julian.descottes@gmail.com>",
"contributors": [ "contributors": [

View File

@@ -3,7 +3,7 @@
*/ */
.main-wrapper { .main-wrapper {
position: absolute; position: fixed;
top: 5px; top: 5px;
right: 0; right: 0;
bottom: 5px; bottom: 5px;
@@ -26,6 +26,7 @@
vertical-align: top; vertical-align: top;
height: 100%; height: 100%;
margin-right: 7px; margin-right: 7px;
flex-shrink: 0;
} }
.main-column { .main-column {
@@ -37,6 +38,7 @@
box-sizing: border-box; box-sizing: border-box;
vertical-align: top; vertical-align: top;
height: 100%; height: 100%;
flex-shrink: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -238,13 +238,15 @@
var evt = jQueryEvent.originalEvent; var evt = jQueryEvent.originalEvent;
// Ratio between wheelDeltaY (mousewheel event) and deltaY (wheel event) is -40 // Ratio between wheelDeltaY (mousewheel event) and deltaY (wheel event) is -40
var delta; var delta;
if (pskl.utils.UserAgent.isChrome) { if (pskl.utils.UserAgent.isIE11) {
delta = evt.wheelDeltaY;
} else if (pskl.utils.UserAgent.isIE11) {
delta = evt.wheelDelta; delta = evt.wheelDelta;
} else if (pskl.utils.UserAgent.isFirefox) { } else if (pskl.utils.UserAgent.isFirefox) {
delta = -40 * evt.deltaY; delta = -40 * evt.deltaY;
} else {
delta = evt.wheelDeltaY;
} }
delta = delta || 0;
var modifier = (delta / 120); var modifier = (delta / 120);
if (pskl.utils.UserAgent.isMac ? evt.metaKey : evt.ctrlKey) { if (pskl.utils.UserAgent.isMac ? evt.metaKey : evt.ctrlKey) {
@@ -278,7 +280,7 @@
var step = zoomMultiplier * this.getZoomStep_(); var step = zoomMultiplier * this.getZoomStep_();
this.setZoom_(this.renderer.getZoom() + step); this.setZoom_(this.renderer.getZoom() + step);
if (centerCoords) { if (typeof centerCoords === 'object') {
var xRatio = (centerCoords.x - off.x) / oldWidth; var xRatio = (centerCoords.x - off.x) / oldWidth;
var yRatio = (centerCoords.y - off.y) / oldHeight; var yRatio = (centerCoords.y - off.y) / oldHeight;
var newWidth = this.getContainerWidth_() / this.renderer.getZoom(); var newWidth = this.getContainerWidth_() / this.renderer.getZoom();