mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
update readme
This commit is contained in:
12
README.md
12
README.md
@@ -128,6 +128,18 @@ In order to run `konva` in nodejs environment you also need to install `canvas`
|
|||||||
npm install konva canvas
|
npm install konva canvas
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then you can use the same Konva API and all Konva demos will work just fine. You just don't need to use `container` attribute in your stage.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import Konva from 'konva';
|
||||||
|
|
||||||
|
const stage = new Konva.Stage({
|
||||||
|
width: 500,
|
||||||
|
height: 500,
|
||||||
|
});
|
||||||
|
// then all regular Konva code will work
|
||||||
|
```
|
||||||
|
|
||||||
### CommonJS modules
|
### CommonJS modules
|
||||||
|
|
||||||
By default `Konva` is delivered as ES modules. Some environments may automatically take CommonJS version of `Konva`. If it doesn't work for you, try to use `cmj` version explicitly:
|
By default `Konva` is delivered as ES modules. Some environments may automatically take CommonJS version of `Konva`. If it doesn't work for you, try to use `cmj` version explicitly:
|
||||||
|
@@ -1242,7 +1242,7 @@ export class Transformer extends Group {
|
|||||||
ignoreStroke: GetSet<boolean, this>;
|
ignoreStroke: GetSet<boolean, this>;
|
||||||
boundBoxFunc: GetSet<(oldBox: Box, newBox: Box) => Box, this>;
|
boundBoxFunc: GetSet<(oldBox: Box, newBox: Box) => Box, this>;
|
||||||
anchorDragBoundFunc: GetSet<
|
anchorDragBoundFunc: GetSet<
|
||||||
(oldPos: Vector2d, newPos: Vector2d, e: MouseEvent) => Box,
|
(oldPos: Vector2d, newPos: Vector2d, e: MouseEvent) => Vector2d,
|
||||||
this
|
this
|
||||||
>;
|
>;
|
||||||
shouldOverdrawWholeArea: GetSet<boolean, this>;
|
shouldOverdrawWholeArea: GetSet<boolean, this>;
|
||||||
|
Reference in New Issue
Block a user