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",
|
"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": [
|
||||||
|
@@ -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;
|
||||||
|
@@ -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();
|
||||||
|
Reference in New Issue
Block a user