We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9968e16 commit be66183Copy full SHA for be66183
src/editor/zoom.js
@@ -0,0 +1,16 @@
1
+
2
+// ошибка в paper-core
3
+(() => {
4
+ function getZoom() {
5
+ const scaling = this._decompose().scaling;
6
+ return (Math.abs(scaling.x) + Math.abs(scaling.y)) / 2;
7
+ }
8
+ const {prototype} = paper.View;
9
+ prototype.getZoom = getZoom
10
+ const setZoom = Object.getOwnPropertyDescriptor(prototype, 'zoom').set;
11
+ delete prototype.zoom;
12
+ Object.defineProperty(prototype, 'zoom', {
13
+ get: getZoom,
14
+ set: setZoom,
15
+ })
16
+})();
0 commit comments