update changes

This commit is contained in:
Anton Lavrenov 2019-02-27 08:11:17 -05:00
parent 8962164096
commit 61a75477c6
2 changed files with 17 additions and 7 deletions

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
## [3.1.0][2019-02-27]
* Make `Konva` modular: `import Konva from 'konva/lib/Core';`;
## [3.0.0][2019-02-25] ## [3.0.0][2019-02-25]
## Breaking ## Breaking

View File

@ -100,16 +100,22 @@ 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:
```javascript ```javascript
import Konva from 'konva/src/Core'; import Konva from 'konva/lib/Core';
// now you have Konva object with Stage, Layer, FastLayer, Group, Shape and some additional utils function // now you have Konva object with Stage, Layer, FastLayer, Group, Shape and some additional utils function.
// so there are no shapes (rect, circle, etc), no filters, no d&d support. // Also core currently already have support for drag&drop and animations.
// BUT there are no shapes (rect, circle, etc), no filters.
// but you can simply add anything you need: // but you can simply add anything you need:
import 'konva/src/shapes/rect'; import { Rect } from 'konva/lib/shapes/Rect';
//now Konva.Rect is available to use // importing a shape will automatically inject it into Konva object
var rect1 = new Rect();
// or:
var shape = new Konva.Rect();
// for filters you can use this:
import { Blur } from 'konva/lib/filters/Blur';
``` ```
### 5 NodeJS ### 5 NodeJS