diff --git a/CHANGELOG.md b/CHANGELOG.md index eceb5456..bf85d57d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,42 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Not released][Not released] +## [1.6.3][2017-05-24] + +### Fixed +- Fixed bug with pointer detection. css 3d transformed stage will not work now. + +## [1.6.2][2017-05-08] + +### Fixed +- Fixed bug with automatic shadow for negative scale values + +## [1.6.1][2017-04-25] + +### Fixed +- Fix pointer position detection + + +### Changed +- moved `globalCompositeOperation` property to `Konva.Node` + +## [1.6.0][2017-04-21] + +### Added +- support of globalCompositeOperation for `Konva.Shape` + +### Fixed +- getAllIntersections now works ok for Text shapes (https://github.com/konvajs/konva/issues/224) + +### Changed +- Konva a bit changed a way to detect pointer position. Now it should be OK to apply css transform on Konva container. https://github.com/konvajs/konva/pull/215 + + +## [1.5.0][2017-03-20] + +### Added +- support for `lineDashOffset` property for `Konva.Shape`. + ## [1.4.0][2017-02-07] ## Added diff --git a/README.md b/README.md index 603e200f..81c6490f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github # Quick Look ```html - +
+ ``` -You can use CDN: [https://cdn.rawgit.com/konvajs/konva/1.4.0/konva.min.js](https://cdn.rawgit.com/konvajs/konva/1.4.0/konva.min.js) +You can use CDN: [https://cdn.rawgit.com/konvajs/konva/1.6.3/konva.min.js](https://cdn.rawgit.com/konvajs/konva/1.6.3/konva.min.js) -###2 Load via AMD (requirejs): +### 2 Load via AMD (requirejs): ```javascript define(['./konva'], function(Konva) { @@ -78,7 +78,7 @@ define(['./konva'], function(Konva) { }); ``` -###3 CommonJS style with npm: +### 3 CommonJS style with npm: ```bash npm install konva --save @@ -96,7 +96,7 @@ import Konva from 'konva'; import * as Konva from 'konva'; ``` -###4 Minimal bundle +### 4 Minimal bundle If you are using webpack or browserfy you can use this approach to load only required Konva's parts: @@ -111,7 +111,7 @@ import 'konva/src/shapes/rect'; //now Konva.Rect is available to use ``` -###5 NodeJS +### 5 NodeJS You have to install some deps manually to use Konva in nodejs env. @@ -126,23 +126,23 @@ See file `resources/nodejs-demo.js` for example. Last tested with node@5.10.1, canvas@1.3.14, jsdom@8.5.0 -#Change log +# Change log See [CHANGELOG.md](https://github.com/konvajs/konva/blob/master/CHANGELOG.md). -#Dev environment +# Dev environment Before doing all dev stuff make sure you have node installed. After that, run `npm install` in the main directory to install the node module dependencies. Run `gulp -T` to see all build options. -##Building the Konva Framework +## Building the Konva Framework To build a development version of the framework, run `gulp dev-build`. To run a full build, which also produces the minified version run `gulp build`. If you add a file in the src directory, be sure to add the filename to the sourceFiles array variable in `gulpfile.js`. -##Testing +## Testing Konva uses Mocha for testing. @@ -152,11 +152,11 @@ Konva uses Mocha for testing. Konva is covered with hundreds of tests and well over a thousand assertions. Konva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test. -##Generate documentation +## Generate documentation Run `gulp api` which will build the documentation files and place them in the `api` folder. -#Pull Requests +# Pull Requests I'd be happy to review any pull requests that may better the Konva project, in particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the tests pass (`gulp lint test`). diff --git a/konva.d.ts b/konva.d.ts index 61bdb68a..07b8542a 100644 --- a/konva.d.ts +++ b/konva.d.ts @@ -1,297 +1,297 @@ declare module Konva { - var pixelRatio : number; + var pixelRatio: number; var dragDistance: number; - var isDragging : () => boolean; - var isDragReady : () => boolean; - var DD : any; + var isDragging: () => boolean; + var isDragReady: () => boolean; + var DD: any; export class Util { - static getRandomColor() : string; - static getRGB(color: string) : string; + static getRandomColor(): string; + static getRGB(color: string): string; } export class Easings { - static BackEaseIn() : any; - static BackEaseInOut() : any; - static BackEaseOut() : any; - static BounceEaseIn() : any; - static BounceEaseInOut() : any; - static BounceEaseOut() : any; - static EaseIn() : any; - static EaseInOut() : any; - static EaseOut() : any; - static ElasticEaseIn() : any; - static ElasticEaseInOut() : any; - static ElasticEaseOut() : any; - static Linear() : any; - static StrongEaseIn() : any; - static StrongEaseInOut() : any; - static StrongEaseOut() : any; + static BackEaseIn(): any; + static BackEaseInOut(): any; + static BackEaseOut(): any; + static BounceEaseIn(): any; + static BounceEaseInOut(): any; + static BounceEaseOut(): any; + static EaseIn(): any; + static EaseInOut(): any; + static EaseOut(): any; + static ElasticEaseIn(): any; + static ElasticEaseInOut(): any; + static ElasticEaseOut(): any; + static Linear(): any; + static StrongEaseIn(): any; + static StrongEaseInOut(): any; + static StrongEaseOut(): any; } class Filter { } export class Filters { - static Blur(imageData : any): Filter; - static Brighten(imageData : any): Filter; - static Emboss(imageData : any): Filter; - static Enhance(imageData : any): Filter; - static Grayscale(imageData : any): Filter; - static HSV(imageData : any): Filter; - static Invert(imageData : any): Filter; - static Mask(imageData : any): Filter; - static Noise(imageData : any): Filter; - static Pixelate(imageData : any): Filter; - static Posterize(imageData : any): Filter; - static RGB(imageData : any): Filter; - static RGA(imageData : any): Filter; - static Sepia(imageData : any): Filter; - static Solarize(imageData : any): Filter; - static Threshold(imageData : any): Filter; + static Blur(imageData: any): Filter; + static Brighten(imageData: any): Filter; + static Emboss(imageData: any): Filter; + static Enhance(imageData: any): Filter; + static Grayscale(imageData: any): Filter; + static HSV(imageData: any): Filter; + static Invert(imageData: any): Filter; + static Mask(imageData: any): Filter; + static Noise(imageData: any): Filter; + static Pixelate(imageData: any): Filter; + static Posterize(imageData: any): Filter; + static RGB(imageData: any): Filter; + static RGA(imageData: any): Filter; + static Sepia(imageData: any): Filter; + static Solarize(imageData: any): Filter; + static Threshold(imageData: any): Filter; } export class Animation { constructor(func: Function, layers?: Layer[]); constructor(func: Function, layer?: Layer); - addLayer(layer: Layer) : boolean; - getLayers() : Layer[]; - isRunning() : boolean; - setLayers(layers : Layer[]) : Animation; - setLayers(layer : Layer) : Animation; - start() : Animation; - stop() : Animation; + addLayer(layer: Layer): boolean; + getLayers(): Layer[]; + isRunning(): boolean; + setLayers(layers: Layer[]): Animation; + setLayers(layer: Layer): Animation; + start(): Animation; + stop(): Animation; } interface NodeConfig { x?: number; y?: number; - width? : number; - height? : number; + width?: number; + height?: number; visible?: boolean; listening?: boolean; id?: string; name?: string; opacity?: Number; scale?: Vector2d; - scaleX? : number; - scaleY? : number; + scaleX?: number; + scaleY?: number; rotation?: number; rotationDeg?: number; offset?: Vector2d; - offsetX? : number; - offsetY? : number; + offsetX?: number; + offsetY?: number; draggable?: boolean; dragBoundFunc?: Function; } interface SizeConfig { - x? : number; - y? : number; - width? : number; - height? : number; + x?: number; + y?: number; + width?: number; + height?: number; } interface ToDataURLConfig extends SizeConfig { - callback : Function; - mimeType? : string; - quality? : number; + callback: Function; + mimeType?: string; + quality?: number; } - interface CacheConfig extends SizeConfig{ - drawBorder? : boolean; + interface CacheConfig extends SizeConfig { + drawBorder?: boolean; } - interface ClearConfig extends SizeConfig{ + interface ClearConfig extends SizeConfig { } class Node { - constructor (config: NodeConfig); - static create