update CHANGELOG with new version

This commit is contained in:
Anton Lavrenov 2021-05-21 18:20:52 -05:00
parent 76bfb69899
commit c4ae3a1880
4 changed files with 7 additions and 22 deletions

View File

@ -25,7 +25,7 @@ group.find('Shape').forEach((shape) => shape.visible(false));
**New features:**
- All updates on canvas will do automatic redraw with `layer.batchDraw()`. This features is configurable with `Konva.autoDrawEnbaled` property.
- All updates on canvas will do automatic redraw with `layer.batchDraw()`. This features is configurable with `Konva.autoDrawEnabled` property. Konva will automatically redraw layer when you change any property, remove or add nodes, do caching. So you don't need to call `layer.draw()` or `layer.batchDraw()` in most of the cases.
- New method `layer.getNativeCanvasElement()`
- new `flipEnabled` property for `Konva.Transformer`
- new `node.isClientRectOnScreen()` method

View File

@ -21,7 +21,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
# Quick Look
```html
<script src="https://unpkg.com/konva@7.2.5/konva.min.js"></script>
<script src="https://unpkg.com/konva@8/konva.min.js"></script>
<div id="container"></div>
<script>
var stage = new Konva.Stage({
@ -47,8 +47,6 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
});
layer.add(box);
layer.draw();
// add cursor styling
box.on('mouseover', function () {
document.body.style.cursor = 'pointer';
@ -72,10 +70,10 @@ Konva supports UMD loading. So you can use all possible variants to load the fra
### 1 Load Konva via classical `<script>` tag:
```html
<script src="https://unpkg.com/konva@7.2.5/konva.min.js"></script>
<script src="https://unpkg.com/konva@8/konva.min.js"></script>
```
You can also use a CDN: [https://unpkg.com/konva@7.2.5/konva.min.js](https://unpkg.com/konva@7.2.5/konva.min.js)
You can also use a CDN: [https://unpkg.com/konva@8/konva.min.js](https://unpkg.com/konva@8/konva.min.js)
### 2 Install with npm:
@ -84,21 +82,17 @@ npm install konva --save
```
```javascript
// The old way (e.g. a CommonJS-style import)
var Konva = require('konva');
// The modern way (e.g. an ES6-style import for webpack, parcel)
import Konva from 'konva';
```
#### Typescript usage
Add DOM definitions into your `tsconfig.json` and set `esModuleInterop` to `true`:
Add DOM definitions into your `tsconfig.json`:
```
{
"compilerOptions": {
"esModuleInterop": true,
"lib": [
"es6",
"dom"
@ -107,12 +101,6 @@ Add DOM definitions into your `tsconfig.json` and set `esModuleInterop` to `true
}
```
Then use it:
```javascript
import Konva from 'konva';
```
### 3 Minimal bundle
```javascript

View File

@ -6,14 +6,12 @@
"README.md",
"konva.js",
"konva.min.js",
"konva.d.ts",
"types",
"lib"
],
"type": "module",
"main": "./lib/index-node.js",
"browser": "./lib/index.js",
"typings": "./types/index-types.d.ts",
"typings": "./lib/index-types.d.ts",
"scripts": {
"start": "npm run test:watch",
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup",

View File

@ -105,8 +105,7 @@ var ABSOLUTE_OPACITY = 'absoluteOpacity',
'offsetXChange.konva',
'offsetYChange.konva',
'transformsEnabledChange.konva',
].join(SPACE),
SCALE_CHANGE_STR = ['scaleXChange.konva', 'scaleYChange.konva'].join(SPACE);
].join(SPACE);
let idCounter = 1;