Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

konva

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

konva - npm Package Compare versions

Comparing version 9.3.4 to 9.3.5

1

lib/_CoreInternals.d.ts

@@ -40,2 +40,3 @@ import { Transform } from './Util.js';

isDragging(): any;
isTransforming(): any;
isDragReady(): boolean;

@@ -42,0 +43,0 @@ releaseCanvasOnDestroy: boolean;

@@ -45,2 +45,3 @@ import { Arc } from './shapes/Arc.js';

isDragging(): any;
isTransforming(): any;
isDragReady(): boolean;

@@ -47,0 +48,0 @@ releaseCanvasOnDestroy: boolean;

@@ -29,2 +29,3 @@ export declare const glob: any;

isDragging(): any;
isTransforming(): any;
isDragReady(): boolean;

@@ -31,0 +32,0 @@ releaseCanvasOnDestroy: boolean;

@@ -19,3 +19,3 @@ "use strict";

_global: exports.glob,
version: '9.3.4',
version: '9.3.5',
isBrowser: detectBrowser(),

@@ -49,2 +49,6 @@ isUnminified: /param/.test(function (param) { }.toString()),

},
isTransforming() {
var _a;
return (_a = exports.Konva['Transformer']) === null || _a === void 0 ? void 0 : _a.isTransforming();
},
isDragReady() {

@@ -51,0 +55,0 @@ return !!exports.Konva['DD'].node;

4

lib/Node.js

@@ -454,3 +454,5 @@ "use strict";

});
var dragSkip = !skipDragCheck && !Global_1.Konva.hitOnDragEnabled && layerUnderDrag;
var dragSkip = !skipDragCheck &&
!Global_1.Konva.hitOnDragEnabled &&
(layerUnderDrag || Global_1.Konva.isTransforming());
return this.isListening() && this.isVisible() && !dragSkip;

@@ -457,0 +459,0 @@ }

@@ -49,2 +49,3 @@ import { Transform } from '../Util.js';

_cursorChange: boolean;
static isTransforming: () => boolean;
constructor(config?: TransformerConfig);

@@ -51,0 +52,0 @@ attachTo(node: Node): this;

@@ -144,2 +144,3 @@ "use strict";

}
let activeTransformersCount = 0;
class Transformer extends Group_1.Group {

@@ -467,2 +468,3 @@ constructor(config) {

};
activeTransformersCount++;
this._fire('transformstart', { evt: e.evt, target: this.getNode() });

@@ -673,2 +675,3 @@ this._nodes.forEach((target) => {

var node = this.getNode();
activeTransformersCount--;
this._fire('transformend', { evt: e, target: node });

@@ -790,7 +793,9 @@ if (node) {

node.setAttrs(attrs);
(_a = node.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();
});
this.rotation(Util_1.Util._getRotation(newAttrs.rotation));
this._nodes.forEach((node) => {
this._fire('transform', { evt: evt, target: node });
node._fire('transform', { evt: evt, target: node });
(_a = node.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();
});
this.rotation(Util_1.Util._getRotation(newAttrs.rotation));
this._resetTransformCache();

@@ -944,2 +949,5 @@ this.update();

exports.Transformer = Transformer;
Transformer.isTransforming = () => {
return activeTransformersCount > 0;
};
function validateAnchors(val) {

@@ -946,0 +954,0 @@ if (!(val instanceof Array)) {

@@ -349,3 +349,3 @@ "use strict";

var targetShape = this._getTargetShape(eventType);
var eventsEnabled = !DragAndDrop_1.DD.isDragging || Global_1.Konva.hitOnDragEnabled;
var eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;
if (targetShape && eventsEnabled) {

@@ -420,7 +420,7 @@ targetShape._fireAndBubble(events.pointerout, { evt: evt });

}
if (DragAndDrop_1.DD.isDragging && DragAndDrop_1.DD.node.preventDefault() && evt.cancelable) {
if (Global_1.Konva.isDragging() && DragAndDrop_1.DD.node.preventDefault() && evt.cancelable) {
evt.preventDefault();
}
this.setPointersPositions(evt);
var eventsEnabled = !DragAndDrop_1.DD.isDragging || Global_1.Konva.hitOnDragEnabled;
var eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;
if (!eventsEnabled) {

@@ -427,0 +427,0 @@ return;

{
"name": "konva",
"version": "9.3.4",
"version": "9.3.5",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc