mirror of
https://github.com/konvajs/konva.git
synced 2025-10-08 00:14:23 +08:00
Compare commits
6 Commits
1721ced50f
...
aa510ccbba
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aa510ccbba | ||
![]() |
40d7a934cd | ||
![]() |
009076fd59 | ||
![]() |
2063709e0e | ||
![]() |
53b358ed33 | ||
![]() |
c7a9078911 |
@@ -3,11 +3,7 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 10.0.0-1 (2025-09-02)
|
||||
|
||||
- Brave detection and warning
|
||||
|
||||
## 10.0.0-0 (2025-08-14)
|
||||
## 10.0.0 (2025-09-07)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
@@ -89,6 +85,7 @@ var text = new Konva.Text({
|
||||
|
||||
- **Performance**: Rewrote Emboss and Solarize filters for improved performance and usability
|
||||
- Changed return type of `node.toImage()`
|
||||
- Brave detection and warning
|
||||
|
||||
## 9.3.22 (2025-07-08)
|
||||
|
||||
|
10
README.md
10
README.md
@@ -22,7 +22,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
|
||||
# Quick Look
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/konva@9/konva.min.js"></script>
|
||||
<script src="https://unpkg.com/konva@10.0.0-1/konva.min.js"></script>
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
var stage = new Konva.Stage({
|
||||
@@ -75,7 +75,7 @@ Konva supports UMD loading. So you can use all possible variants to load the fra
|
||||
### Load Konva via classical `<script>` tag from CDN:
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/konva@9/konva.min.js"></script>
|
||||
<script src="https://unpkg.com/konva@10.0.0-1/konva.min.js"></script>
|
||||
```
|
||||
|
||||
### Install with npm:
|
||||
@@ -126,16 +126,20 @@ import { Blur } from 'konva/lib/filters/Blur';
|
||||
|
||||
### 4 NodeJS env
|
||||
|
||||
In order to run `konva` in nodejs environment you also need to install `canvas` package manually. Konva will use it for 2d canvas API.
|
||||
In order to run `konva` in nodejs environment you also need to install `canvas` or `skia-canvas` package manually for rendering backend.
|
||||
|
||||
```bash
|
||||
# node-canvas backend
|
||||
npm install konva canvas
|
||||
# skia-canvas backend
|
||||
npm install konva skia-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';
|
||||
import 'konva/canvas-backend'; // or import 'konva/skia-backend';
|
||||
|
||||
const stage = new Konva.Stage({
|
||||
width: 500,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "konva",
|
||||
"version": "10.0.0-1",
|
||||
"version": "10.0.0",
|
||||
"description": "HTML5 2d canvas library.",
|
||||
"author": "Anton Lavrenov",
|
||||
"type": "module",
|
||||
|
@@ -5,9 +5,6 @@ old_version="$(git describe --abbrev=0 --tags)"
|
||||
new_version=$1
|
||||
|
||||
|
||||
old_cdn="https://unpkg.com/konva@${old_version}/konva.js"
|
||||
new_cdn="https://unpkg.com/konva@${new_version}/konva.js"
|
||||
|
||||
old_cdn_min="https://unpkg.com/konva@${old_version}/konva.min.js"
|
||||
new_cdn_min="https://unpkg.com/konva@${new_version}/konva.min.js"
|
||||
|
||||
@@ -59,7 +56,7 @@ git tag $1 >/dev/null
|
||||
cd ../konva
|
||||
git push >/dev/null
|
||||
git push --tags >/dev/null
|
||||
npm publish --tag next
|
||||
npm publish
|
||||
|
||||
|
||||
echo "DONE!"
|
||||
|
@@ -228,7 +228,7 @@ export class Layer extends Container<Group | Shape> {
|
||||
}
|
||||
}
|
||||
_toKonvaCanvas(config) {
|
||||
config = config || {};
|
||||
config = { ...config };
|
||||
config.width = config.width || this.getWidth();
|
||||
config.height = config.height || this.getHeight();
|
||||
config.x = config.x !== undefined ? config.x : this.x();
|
||||
|
@@ -316,7 +316,7 @@ export class Stage extends Container<Layer> {
|
||||
return this.content;
|
||||
}
|
||||
_toKonvaCanvas(config) {
|
||||
config = config || {};
|
||||
config = { ...config };
|
||||
|
||||
config.x = config.x || 0;
|
||||
config.y = config.y || 0;
|
||||
|
Reference in New Issue
Block a user