Socket
Socket
Sign inDemoInstall

konva

Package Overview
Dependencies
Maintainers
1
Versions
211
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 1.0.3 to 1.1.0

5

CHANGELOG.md

@@ -7,2 +7,7 @@ # Change Log

## [1.1.0][2016-08-21]
## Added
- new property of `Konva.Shape` - `preventDefault`.
## [1.0.3][2016-08-14]

@@ -9,0 +14,0 @@

2

package.json
{
"name": "konva",
"version": "1.0.3",
"version": "1.1.0",
"author": "Anton Lavrenov",

@@ -5,0 +5,0 @@ "files": [

@@ -23,3 +23,3 @@ ![Konva logo](https://raw.githubusercontent.com/konvajs/konvajs.github.io/master/apple-touch-icon-180x180.png)

```html
<script src="https://cdn.rawgit.com/konvajs/konva/1.0.3/konva.min.js"></script>
<script src="https://cdn.rawgit.com/konvajs/konva/1.1.0/konva.min.js"></script>
<div id="container"></div>

@@ -69,6 +69,6 @@ <script>

```html
<script src="https://cdn.rawgit.com/konvajs/konva/1.0.3/konva.min.js"></script>
<script src="https://cdn.rawgit.com/konvajs/konva/1.1.0/konva.min.js"></script>
```
You can use CDN: [https://cdn.rawgit.com/konvajs/konva/1.0.3/konva.min.js](https://cdn.rawgit.com/konvajs/konva/1.0.3/konva.min.js)
You can use CDN: [https://cdn.rawgit.com/konvajs/konva/1.1.0/konva.min.js](https://cdn.rawgit.com/konvajs/konva/1.1.0/konva.min.js)

@@ -75,0 +75,0 @@ ###2 Load via AMD (requirejs):

@@ -469,2 +469,24 @@ (function(Konva) {

/**
* get/set preventDefault
* By default all shapes will prevent default behaviour
* of a browser on a pointer move or tap.
* that will prevent native scrolling when you are trying to drag&drop a shape
* but sometimes you may need to enable default actions
* in that case you can set the property to false
* @name preventDefault
* @method
* @memberof Konva.Shape.prototype
* @param {Number} preventDefault
* @returns {Number}
* @example
* // get stroke width
* var strokeWidth = shape.strokeWidth();
*
* // set stroke width
* shape.strokeWidth();
*/
Konva.Factory.addGetterSetter(Konva.Shape, 'preventDefault', true);
/**
* get/set stroke width

@@ -471,0 +493,0 @@ * @name strokeWidth

@@ -567,3 +567,3 @@ (function() {

// only call preventDefault if the shape is listening for events
if (shape.isListening() && evt.preventDefault) {
if (shape.isListening() && shape.preventDefault() && evt.preventDefault) {
evt.preventDefault();

@@ -604,3 +604,3 @@ }

// only call preventDefault if the shape is listening for events
if (shape.isListening() && evt.preventDefault) {
if (shape.isListening() && shape.preventDefault() && evt.preventDefault) {
evt.preventDefault();

@@ -629,3 +629,3 @@ }

// only call preventDefault if the shape is listening for events
if (shape.isListening() && evt.preventDefault) {
if (shape.isListening() && shape.preventDefault() && evt.preventDefault) {
evt.preventDefault();

@@ -637,3 +637,3 @@ }

if(dd) {
if (Konva.isDragging()) {
if (Konva.isDragging() && Konva.DD.node.preventDefault()) {
evt.preventDefault();

@@ -640,0 +640,0 @@ }

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