mirror of
https://github.com/konvajs/konva.git
synced 2026-01-22 21:02:26 +08:00
fix readme
This commit is contained in:
11
README.md
11
README.md
@@ -123,21 +123,14 @@ import { Blur } from 'konva/lib/filters/Blur';
|
|||||||
|
|
||||||
### 4 NodeJS env
|
### 4 NodeJS env
|
||||||
|
|
||||||
We are using [node-canvas](https://github.com/Automattic/node-canvas) to create canvas element.
|
In order to run `konva` in nodejs environment you also need to install `canvas` package manually. Konva will use it for 2d canvas API.
|
||||||
Please check installation instructions for it. Then just run
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install konva-node
|
npm install konva canvas
|
||||||
```
|
```
|
||||||
|
|
||||||
Then in you javascript file you will need to use
|
Then in you javascript file you will need to use
|
||||||
|
|
||||||
```javascript
|
|
||||||
const Konva = require('konva-node');
|
|
||||||
```
|
|
||||||
|
|
||||||
See file `konva-node/demo.js` file in this repo as a sample.
|
|
||||||
|
|
||||||
# Backers
|
# Backers
|
||||||
|
|
||||||
- [myposter GmbH](https://www.myposter.de/)
|
- [myposter GmbH](https://www.myposter.de/)
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export class Layer extends Container<Group | Shape> {
|
|||||||
/**
|
/**
|
||||||
* get native canvas element
|
* get native canvas element
|
||||||
* @method
|
* @method
|
||||||
* @name Konva.Layer#getCanvas
|
* @name Konva.Layer#getNativeCanvasElement
|
||||||
*/
|
*/
|
||||||
getNativeCanvasElement() {
|
getNativeCanvasElement() {
|
||||||
return this.canvas._canvas;
|
return this.canvas._canvas;
|
||||||
@@ -263,7 +263,8 @@ export class Layer extends Container<Group | Shape> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_setSmoothEnabled() {
|
_setSmoothEnabled() {
|
||||||
this.getContext()._context.imageSmoothingEnabled = this.imageSmoothingEnabled();
|
this.getContext()._context.imageSmoothingEnabled =
|
||||||
|
this.imageSmoothingEnabled();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* get/set width of layer. getter return width of stage. setter doing nothing.
|
* get/set width of layer. getter return width of stage. setter doing nothing.
|
||||||
|
|||||||
Reference in New Issue
Block a user