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 0.14.0 to 0.15.0

5

CHANGELOG.md

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

## [0.15.0][2016-06-18]
## Added
- Custom clip function
## [0.14.0][2016-06-17]

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

2

konva.d.ts

@@ -286,2 +286,4 @@ declare module Konva {

clipY(clipY: number) : Container;
clipFunct(): number;
clipFunct(clipFunc: Function) : Container;
destroyChildren() : void;

@@ -288,0 +290,0 @@ find(selector? : string): Collection;

2

package.json
{
"name": "konva",
"version": "0.14.0",
"version": "0.15.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/0.14.0/konva.min.js"></script>
<script src="https://cdn.rawgit.com/konvajs/konva/0.15.0/konva.min.js"></script>
<div id="container"></div>

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

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

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

@@ -371,13 +371,17 @@ (function() {

clipHeight = this.getClipHeight(),
hasClip = clipWidth && clipHeight,
clipFunc = this.getClipFunc(),
hasClip = clipWidth && clipHeight || clipFunc,
clipX, clipY;
if (hasClip && layer) {
clipX = this.getClipX();
clipY = this.getClipY();
context.save();
layer._applyTransform(this, context);
context.beginPath();
context.rect(clipX, clipY, clipWidth, clipHeight);
if (clipFunc) {
clipFunc.call(this, context, this);
} else {
clipX = this.getClipX();
clipY = this.getClipY();
context.rect(clipX, clipY, clipWidth, clipHeight);
}
context.clip();

@@ -543,3 +547,21 @@ context.reset();

Konva.Factory.addGetterSetter(Konva.Container, 'clipFunc');
/**
* get/set clip function
* @name clipFunc
* @method
* @memberof Konva.Container.prototype
* @param {Function} function
* @returns {Function}
* @example
* // get clip function
* var clipFunction = container.clipFunc();
*
* // set clip height
* container.clipFunc(function(ctx) {
* ctx.rect(0, 0, 100, 100);
* });
*/
Konva.Collection.mapMethods(Konva.Container);
})();

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