mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
update CDN link
This commit is contained in:
parent
d0aff1ef2b
commit
54411374fa
10
README.md
10
README.md
@ -20,7 +20,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
|
|||||||
# Quick Look
|
# Quick Look
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js"></script>
|
<script src="https://cdn.rawgit.com/konvajs/konva/0.11.1/konva.min.js"></script>
|
||||||
<div id="container"></div>
|
<div id="container"></div>
|
||||||
<script>
|
<script>
|
||||||
var stage = new Konva.Stage({
|
var stage = new Konva.Stage({
|
||||||
@ -45,7 +45,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
|
|||||||
draggable: true
|
draggable: true
|
||||||
});
|
});
|
||||||
layer.add(box);
|
layer.add(box);
|
||||||
|
|
||||||
layer.draw();
|
layer.draw();
|
||||||
|
|
||||||
// add cursor styling
|
// add cursor styling
|
||||||
@ -65,16 +65,16 @@ Konva supports UMD loading. So you can use all possible variants to load the fra
|
|||||||
###1 Load Konva via classical `<script>` tag:
|
###1 Load Konva via classical `<script>` tag:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js"></script>
|
<script src="https://cdn.rawgit.com/konvajs/konva/0.11.1/konva.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use CDN: [https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js](https://cdn.rawgit.com/konvajs/konva/0.10.0/konva.min.js)
|
You can use CDN: [https://cdn.rawgit.com/konvajs/konva/0.11.1/konva.min.js](https://cdn.rawgit.com/konvajs/konva/0.11.1/konva.min.js)
|
||||||
|
|
||||||
###2 Load via AMD (requirejs):
|
###2 Load via AMD (requirejs):
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
define(['./konva'], function(Konva) {
|
define(['./konva'], function(Konva) {
|
||||||
// your code
|
// your code
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user