mirror of
https://github.com/konvajs/konva.git
synced 2025-12-19 19:56:59 +08:00
update jsdom API. close #36
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "konva",
|
"name": "konva",
|
||||||
"version": "0.9.0",
|
"version": "0.9.5",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Eric Rowell", "Anton Lavrenov"
|
"Anton Lavrenov", "Eric Rowell"
|
||||||
],
|
],
|
||||||
"homepage": "http://konvajs.github.io",
|
"homepage": "http://konvajs.github.io",
|
||||||
"description": "Konva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.",
|
"description": "Konva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.",
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
"*.yml",
|
"*.yml",
|
||||||
".jshitrc",
|
".jshitrc",
|
||||||
".npmignore",
|
".npmignore",
|
||||||
|
"package.json",
|
||||||
".travis.yml",
|
".travis.yml",
|
||||||
".gitignore",
|
".gitignore",
|
||||||
"Gruntfile.js"
|
"Gruntfile.js"
|
||||||
|
|||||||
12
konva.js
12
konva.js
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Konva JavaScript Framework v0.9.0
|
* Konva JavaScript Framework v0.9.5
|
||||||
* http://konvajs.github.io/
|
* http://konvajs.github.io/
|
||||||
* Licensed under the MIT or GPL Version 2 licenses.
|
* Licensed under the MIT or GPL Version 2 licenses.
|
||||||
* Date: 2015-02-27
|
* Date: 2015-03-13
|
||||||
*
|
*
|
||||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||||
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
||||||
@@ -36,7 +36,7 @@ var Konva = {};
|
|||||||
|
|
||||||
Konva = {
|
Konva = {
|
||||||
// public
|
// public
|
||||||
version: '0.9.0',
|
version: '0.9.5',
|
||||||
|
|
||||||
// private
|
// private
|
||||||
stages: [],
|
stages: [],
|
||||||
@@ -601,7 +601,7 @@ var Konva = {};
|
|||||||
var jsdom = require('jsdom').jsdom;
|
var jsdom = require('jsdom').jsdom;
|
||||||
|
|
||||||
Konva.document = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
|
Konva.document = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
|
||||||
Konva.window = Konva.document.createWindow();
|
Konva.window = Konva.document.parentWindow;
|
||||||
Konva.window.Image = Canvas.Image;
|
Konva.window.Image = Canvas.Image;
|
||||||
Konva._nodeCanvas = Canvas;
|
Konva._nodeCanvas = Canvas;
|
||||||
}
|
}
|
||||||
@@ -7039,7 +7039,7 @@ var Konva = {};
|
|||||||
params.node = this;
|
params.node = this;
|
||||||
params.onFinish = function() {
|
params.onFinish = function() {
|
||||||
tween.destroy();
|
tween.destroy();
|
||||||
onFinish();
|
onFinish && onFinish();
|
||||||
};
|
};
|
||||||
var tween = new Konva.Tween(params);
|
var tween = new Konva.Tween(params);
|
||||||
tween.play();
|
tween.play();
|
||||||
@@ -9809,7 +9809,6 @@ var Konva = {};
|
|||||||
|
|
||||||
DIV = 'div',
|
DIV = 'div',
|
||||||
RELATIVE = 'relative',
|
RELATIVE = 'relative',
|
||||||
INLINE_BLOCK = 'inline-block',
|
|
||||||
KONVA_CONTENT = 'konvajs-content',
|
KONVA_CONTENT = 'konvajs-content',
|
||||||
SPACE = ' ',
|
SPACE = ' ',
|
||||||
UNDERSCORE = '_',
|
UNDERSCORE = '_',
|
||||||
@@ -10472,7 +10471,6 @@ var Konva = {};
|
|||||||
// content
|
// content
|
||||||
this.content = Konva.document.createElement(DIV);
|
this.content = Konva.document.createElement(DIV);
|
||||||
this.content.style.position = RELATIVE;
|
this.content.style.position = RELATIVE;
|
||||||
this.content.style.display = INLINE_BLOCK;
|
|
||||||
this.content.className = KONVA_CONTENT;
|
this.content.className = KONVA_CONTENT;
|
||||||
this.content.setAttribute('role', 'presentation');
|
this.content.setAttribute('role', 'presentation');
|
||||||
container.appendChild(this.content);
|
container.appendChild(this.content);
|
||||||
|
|||||||
14
konva.min.js
vendored
14
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
var fs = require('fs'),
|
var fs = require('fs'),
|
||||||
Konva = require('./dist/konva-dev');
|
Konva = require('../dist/konva-dev');
|
||||||
|
|
||||||
|
|
||||||
// Create stage. Container parameter is not required in NodeJS.
|
// Create stage. Container parameter is not required in NodeJS.
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ var Konva = {};
|
|||||||
var jsdom = require('jsdom').jsdom;
|
var jsdom = require('jsdom').jsdom;
|
||||||
|
|
||||||
Konva.document = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
|
Konva.document = jsdom('<!DOCTYPE html><html><head></head><body></body></html>');
|
||||||
Konva.window = Konva.document.createWindow();
|
Konva.window = Konva.document.parentWindow;
|
||||||
Konva.window.Image = Canvas.Image;
|
Konva.window.Image = Canvas.Image;
|
||||||
Konva._nodeCanvas = Canvas;
|
Konva._nodeCanvas = Canvas;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user