Comparing version 9.0.0 to 9.0.1
@@ -19,3 +19,3 @@ "use strict"; | ||
_global: exports.glob, | ||
version: '9.0.0', | ||
version: '9.0.1', | ||
isBrowser: detectBrowser(), | ||
@@ -22,0 +22,0 @@ isUnminified: /param/.test(function (param) { }.toString()), |
@@ -44,2 +44,3 @@ import { Transform } from './Util.js'; | ||
evt: EventType; | ||
pointerId: number; | ||
currentTarget: Node; | ||
@@ -46,0 +47,0 @@ cancelBubble: boolean; |
@@ -1159,21 +1159,17 @@ "use strict"; | ||
_getProtoListeners(eventType) { | ||
let listeners = this._cache.get(ALL_LISTENERS); | ||
if (!listeners) { | ||
listeners = {}; | ||
var _a, _b, _c; | ||
const allListeners = (_a = this._cache.get(ALL_LISTENERS)) !== null && _a !== void 0 ? _a : {}; | ||
let events = allListeners === null || allListeners === void 0 ? void 0 : allListeners[eventType]; | ||
if (events === undefined) { | ||
events = []; | ||
let obj = Object.getPrototypeOf(this); | ||
while (obj) { | ||
if (!obj.eventListeners) { | ||
obj = Object.getPrototypeOf(obj); | ||
continue; | ||
} | ||
for (var event in obj.eventListeners) { | ||
const newEvents = obj.eventListeners[event]; | ||
const oldEvents = listeners[event] || []; | ||
listeners[event] = newEvents.concat(oldEvents); | ||
} | ||
const hierarchyEvents = (_c = (_b = obj.eventListeners) === null || _b === void 0 ? void 0 : _b[eventType]) !== null && _c !== void 0 ? _c : []; | ||
events.push(...hierarchyEvents); | ||
obj = Object.getPrototypeOf(obj); | ||
} | ||
this._cache.set(ALL_LISTENERS, listeners); | ||
allListeners[eventType] = events; | ||
this._cache.set(ALL_LISTENERS, allListeners); | ||
} | ||
return listeners[eventType]; | ||
return events; | ||
} | ||
@@ -1180,0 +1176,0 @@ _fire(eventType, evt) { |
@@ -26,2 +26,3 @@ import { Transform } from '../Util.js'; | ||
keepRatio?: boolean; | ||
shiftBehavior?: string; | ||
centeredScaling?: boolean; | ||
@@ -110,2 +111,3 @@ enabledAnchors?: Array<string>; | ||
keepRatio: GetSet<boolean, this>; | ||
shiftBehavior: GetSet<string, this>; | ||
centeredScaling: GetSet<boolean, this>; | ||
@@ -112,0 +114,0 @@ flipEnabled: GetSet<boolean, this>; |
@@ -500,3 +500,13 @@ "use strict"; | ||
} | ||
var keepProportion = this.keepRatio() || e.shiftKey; | ||
var shiftBehavior = this.shiftBehavior(); | ||
var keepProportion; | ||
if (shiftBehavior === 'inverted') { | ||
keepProportion = this.keepRatio() && !e.shiftKey; | ||
} | ||
else if (shiftBehavior === 'none') { | ||
keepProportion = this.keepRatio(); | ||
} | ||
else { | ||
keepProportion = this.keepRatio() || e.shiftKey; | ||
} | ||
var centeredScaling = this.centeredScaling() || e.altKey; | ||
@@ -959,2 +969,3 @@ if (this._movingAnchorName === 'top-left') { | ||
Factory_1.Factory.addGetterSetter(Transformer, 'keepRatio', true); | ||
Factory_1.Factory.addGetterSetter(Transformer, 'shiftBehavior', 'default'); | ||
Factory_1.Factory.addGetterSetter(Transformer, 'centeredScaling', false); | ||
@@ -961,0 +972,0 @@ Factory_1.Factory.addGetterSetter(Transformer, 'ignoreStroke', false); |
{ | ||
"name": "konva", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"author": "Anton Lavrenov", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1386056
33113