mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 05:58:29 +08:00
fix readme
This commit is contained in:
parent
e4436bace9
commit
3f2c2e5042
11
README.md
11
README.md
@ -123,21 +123,14 @@ import { Blur } from 'konva/lib/filters/Blur';
|
||||
|
||||
### 4 NodeJS env
|
||||
|
||||
We are using [node-canvas](https://github.com/Automattic/node-canvas) to create canvas element.
|
||||
Please check installation instructions for it. Then just run
|
||||
In order to run `konva` in nodejs environment you also need to install `canvas` package manually. Konva will use it for 2d canvas API.
|
||||
|
||||
```bash
|
||||
npm install konva-node
|
||||
npm install konva canvas
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
- [myposter GmbH](https://www.myposter.de/)
|
||||
|
@ -86,7 +86,7 @@ export class Layer extends Container<Group | Shape> {
|
||||
/**
|
||||
* get native canvas element
|
||||
* @method
|
||||
* @name Konva.Layer#getCanvas
|
||||
* @name Konva.Layer#getNativeCanvasElement
|
||||
*/
|
||||
getNativeCanvasElement() {
|
||||
return this.canvas._canvas;
|
||||
@ -263,7 +263,8 @@ export class Layer extends Container<Group | Shape> {
|
||||
}
|
||||
|
||||
_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.
|
||||
|
Loading…
Reference in New Issue
Block a user