mirror of
https://github.com/konvajs/konva.git
synced 2026-01-22 21:02:26 +08:00
fix test
This commit is contained in:
20
.travis.yml
20
.travis.yml
@@ -1,20 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- node
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
sudo: required
|
|
||||||
before_script:
|
|
||||||
- npm install -g gulp
|
|
||||||
script:
|
|
||||||
- npm run full-build
|
|
||||||
deploy:
|
|
||||||
provider: npm
|
|
||||||
email: lavrton@gmail.com
|
|
||||||
api_key:
|
|
||||||
secure: rYqyBhn3K8tnt/XK6RFodBiIsIqwmUuPBEAOQxRt/elK4F7BVC+ba7/xgsvdFLP+Bqn4sS8b/YjfxUqm0lfxoph3qvvyKZ+qjuGCXBtvbY8EgGqX3FJKq/LJp8Vu4encCUOpI3PWXQEB+0OrC8ntKnBn1L1WP6lzDbRHj49e9ew=
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
all_branches: true
|
|
||||||
repo: konvajs/konva
|
|
||||||
@@ -16,7 +16,7 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
|
|||||||
|
|
||||||
- **Visit:** The [Home Page](http://konvajs.org/) and follow on [Twitter](https://twitter.com/lavrton)
|
- **Visit:** The [Home Page](http://konvajs.org/) and follow on [Twitter](https://twitter.com/lavrton)
|
||||||
- **Discover:** [Tutorials](http://konvajs.org/docs), [API Documentation](http://konvajs.org/api)
|
- **Discover:** [Tutorials](http://konvajs.org/docs), [API Documentation](http://konvajs.org/api)
|
||||||
- **Help:** [StackOverflow](http://stackoverflow.com/questions/tagged/konvajs), [Chat](https://gitter.im/konvajs/konva)
|
- **Help:** [StackOverflow](http://stackoverflow.com/questions/tagged/konvajs), [Discord Chat](https://discord.gg/8FqZwVT)
|
||||||
|
|
||||||
# Quick Look
|
# Quick Look
|
||||||
|
|
||||||
|
|||||||
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
|||||||
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup",
|
"compile": "npm run clean && npm run tsc && cp ./src/index-types.d.ts ./lib/index-types.d.ts && npm run rollup",
|
||||||
"build": "npm run compile && cp ./src/index-types.d.ts ./lib && gulp build",
|
"build": "npm run compile && cp ./src/index-types.d.ts ./lib && gulp build",
|
||||||
"full-build": "npm run build && npm t",
|
"full-build": "npm run build && npm t",
|
||||||
"test": "node ./test/import-test.js && npm run test:browser && npm run test:node",
|
"test": "node ./test/import-test.js && npm run test:browser",
|
||||||
"test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps",
|
"test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps",
|
||||||
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security",
|
"test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security",
|
||||||
"test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts --exit",
|
"test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts --exit",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { glob } from './Global.js';
|
import { glob } from './Global';
|
||||||
import { Layer } from './Layer.js';
|
import { Layer } from './Layer';
|
||||||
import { IFrame, AnimationFn } from './types';
|
import { IFrame, AnimationFn } from './types';
|
||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
|
|
||||||
var now = (function (): () => number {
|
var now = (function (): () => number {
|
||||||
if (glob.performance && glob.performance.now) {
|
if (glob.performance && glob.performance.now) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { SceneContext, HitContext, Context } from './Context.js';
|
import { SceneContext, HitContext, Context } from './Context';
|
||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { Factory } from './Factory.js';
|
import { Factory } from './Factory';
|
||||||
import { getNumberValidator } from './Validators.js';
|
import { getNumberValidator } from './Validators';
|
||||||
|
|
||||||
// calculate pixel ratio
|
// calculate pixel ratio
|
||||||
var _pixelRatio;
|
var _pixelRatio;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Factory } from './Factory.js';
|
import { Factory } from './Factory';
|
||||||
import { Node, NodeConfig } from './Node.js';
|
import { Node, NodeConfig } from './Node';
|
||||||
import { getNumberValidator } from './Validators.js';
|
import { getNumberValidator } from './Validators';
|
||||||
|
|
||||||
import { GetSet, IRect } from './types';
|
import { GetSet, IRect } from './types';
|
||||||
import { Shape } from './Shape.js';
|
import { Shape } from './Shape';
|
||||||
import { HitCanvas, SceneCanvas } from './Canvas.js';
|
import { HitCanvas, SceneCanvas } from './Canvas';
|
||||||
|
|
||||||
export interface ContainerConfig extends NodeConfig {
|
export interface ContainerConfig extends NodeConfig {
|
||||||
clearBeforeDraw?: boolean;
|
clearBeforeDraw?: boolean;
|
||||||
@@ -309,15 +309,15 @@ export abstract class Container<
|
|||||||
|
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
_clearSelfAndDescendantCache(attr?: string, forceEvent?: boolean) {
|
_clearSelfAndDescendantCache(attr?: string) {
|
||||||
super._clearSelfAndDescendantCache(attr, forceEvent);
|
super._clearSelfAndDescendantCache(attr);
|
||||||
// skip clearing if node is cached with canvas
|
// skip clearing if node is cached with canvas
|
||||||
// for performance reasons !!!
|
// for performance reasons !!!
|
||||||
if (this.isCached()) {
|
if (this.isCached()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.children?.forEach(function (node) {
|
this.children?.forEach(function (node) {
|
||||||
node._clearSelfAndDescendantCache(attr, forceEvent);
|
node._clearSelfAndDescendantCache(attr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
_setChildrenIndices() {
|
_setChildrenIndices() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { Canvas } from './Canvas.js';
|
import { Canvas } from './Canvas';
|
||||||
import { Shape } from './Shape.js';
|
import { Shape } from './Shape';
|
||||||
|
|
||||||
var COMMA = ',',
|
var COMMA = ',',
|
||||||
OPEN_PAREN = '(',
|
OPEN_PAREN = '(',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// enter file of limited Konva version with only core functions
|
// enter file of limited Konva version with only core functions
|
||||||
export { Konva } from './_CoreInternals.js';
|
export { Konva } from './_CoreInternals';
|
||||||
import { Konva } from './_CoreInternals.js';
|
import { Konva } from './_CoreInternals';
|
||||||
|
|
||||||
export default Konva;
|
export default Konva;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { Node } from './Node.js';
|
import { Node } from './Node';
|
||||||
import { Vector2d } from './types';
|
import { Vector2d } from './types';
|
||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
|
|
||||||
export const DD = {
|
export const DD = {
|
||||||
get isDragging() {
|
get isDragging() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { getComponentValidator } from './Validators.js';
|
import { getComponentValidator } from './Validators';
|
||||||
|
|
||||||
var GET = 'get',
|
var GET = 'get',
|
||||||
SET = 'set';
|
SET = 'set';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Layer } from './Layer.js';
|
import { Layer } from './Layer';
|
||||||
import { _registerNode } from './Global.js';
|
import { _registerNode } from './Global';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FastLayer constructor. **DEPRECATED!** Please use `Konva.Layer({ listening: false})` instead. Layers are tied to their own canvas element and are used
|
* FastLayer constructor. **DEPRECATED!** Please use `Konva.Layer({ listening: false})` instead. Layers are tied to their own canvas element and are used
|
||||||
|
|||||||
10
src/Group.ts
10
src/Group.ts
@@ -1,8 +1,8 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Container } from './Container.js';
|
import { Container } from './Container';
|
||||||
import { _registerNode } from './Global.js';
|
import { _registerNode } from './Global';
|
||||||
import { Node } from './Node.js';
|
import { Node } from './Node';
|
||||||
import { Shape } from './Shape.js';
|
import { Shape } from './Shape';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Group constructor. Groups are used to contain shapes or other groups.
|
* Group constructor. Groups are used to contain shapes or other groups.
|
||||||
|
|||||||
20
src/Layer.ts
20
src/Layer.ts
@@ -1,15 +1,15 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Container, ContainerConfig } from './Container.js';
|
import { Container, ContainerConfig } from './Container';
|
||||||
import { Node } from './Node.js';
|
import { Node } from './Node';
|
||||||
import { Factory } from './Factory.js';
|
import { Factory } from './Factory';
|
||||||
import { SceneCanvas, HitCanvas } from './Canvas.js';
|
import { SceneCanvas, HitCanvas } from './Canvas';
|
||||||
import { Stage } from './Stage.js';
|
import { Stage } from './Stage';
|
||||||
import { getBooleanValidator } from './Validators.js';
|
import { getBooleanValidator } from './Validators';
|
||||||
|
|
||||||
import { GetSet, Vector2d } from './types';
|
import { GetSet, Vector2d } from './types';
|
||||||
import { Group } from './Group.js';
|
import { Group } from './Group';
|
||||||
import { Shape, shapes } from './Shape.js';
|
import { Shape, shapes } from './Shape';
|
||||||
import { _registerNode } from './Global.js';
|
import { _registerNode } from './Global';
|
||||||
|
|
||||||
export interface LayerConfig extends ContainerConfig {
|
export interface LayerConfig extends ContainerConfig {
|
||||||
clearBeforeDraw?: boolean;
|
clearBeforeDraw?: boolean;
|
||||||
|
|||||||
28
src/Node.ts
28
src/Node.ts
@@ -1,19 +1,19 @@
|
|||||||
import { Util, Transform } from './Util.js';
|
import { Util, Transform } from './Util';
|
||||||
import { Factory } from './Factory.js';
|
import { Factory } from './Factory';
|
||||||
import { SceneCanvas, HitCanvas, Canvas } from './Canvas.js';
|
import { SceneCanvas, HitCanvas, Canvas } from './Canvas';
|
||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { Container } from './Container.js';
|
import { Container } from './Container';
|
||||||
import { GetSet, Vector2d, IRect } from './types';
|
import { GetSet, Vector2d, IRect } from './types';
|
||||||
import { DD } from './DragAndDrop.js';
|
import { DD } from './DragAndDrop';
|
||||||
import {
|
import {
|
||||||
getNumberValidator,
|
getNumberValidator,
|
||||||
getStringValidator,
|
getStringValidator,
|
||||||
getBooleanValidator,
|
getBooleanValidator,
|
||||||
} from './Validators.js';
|
} from './Validators';
|
||||||
import { Stage } from './Stage.js';
|
import { Stage } from './Stage';
|
||||||
import { Context } from './Context.js';
|
import { Context } from './Context';
|
||||||
import { Shape } from './Shape.js';
|
import { Shape } from './Shape';
|
||||||
import { Layer } from './Layer.js';
|
import { Layer } from './Layer';
|
||||||
|
|
||||||
export const ids: any = {};
|
export const ids: any = {};
|
||||||
export const names: any = {};
|
export const names: any = {};
|
||||||
@@ -1162,7 +1162,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
|||||||
this._batchingTransformChange = false;
|
this._batchingTransformChange = false;
|
||||||
if (this._needClearTransformCache) {
|
if (this._needClearTransformCache) {
|
||||||
this._clearCache(TRANSFORM);
|
this._clearCache(TRANSFORM);
|
||||||
this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM, true);
|
this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);
|
||||||
}
|
}
|
||||||
this._needClearTransformCache = false;
|
this._needClearTransformCache = false;
|
||||||
}
|
}
|
||||||
@@ -1208,7 +1208,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
|||||||
if (haveCachedParent && !top) {
|
if (haveCachedParent && !top) {
|
||||||
// make fake top element
|
// make fake top element
|
||||||
// "true" is not a node, but it will just allow skip all caching
|
// "true" is not a node, but it will just allow skip all caching
|
||||||
top = true;
|
top = true as any;
|
||||||
}
|
}
|
||||||
var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(),
|
var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(),
|
||||||
absoluteTransform = new Transform(),
|
absoluteTransform = new Transform(),
|
||||||
@@ -1553,7 +1553,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
|||||||
* // get one of the parent group
|
* // get one of the parent group
|
||||||
* var parentGroups = node.findAncestors('Group');
|
* var parentGroups = node.findAncestors('Group');
|
||||||
*/
|
*/
|
||||||
findAncestors(selector: string, includeSelf?: boolean, stopNode?: Container) {
|
findAncestors(selector: string, includeSelf?: boolean, stopNode?: Node) {
|
||||||
var res: Array<Node> = [];
|
var res: Array<Node> = [];
|
||||||
|
|
||||||
if (includeSelf && this._isMatch(selector)) {
|
if (includeSelf && this._isMatch(selector)) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { KonvaEventObject } from './Node.js';
|
import { KonvaEventObject } from './Node';
|
||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
|
|
||||||
import { Shape } from './Shape.js';
|
import { Shape } from './Shape';
|
||||||
import { Stage } from './Stage.js';
|
import { Stage } from './Stage';
|
||||||
|
|
||||||
const Captures = new Map<number, Shape | Stage>();
|
const Captures = new Map<number, Shape | Stage>();
|
||||||
|
|
||||||
|
|||||||
16
src/Shape.ts
16
src/Shape.ts
@@ -1,20 +1,20 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Factory } from './Factory.js';
|
import { Factory } from './Factory';
|
||||||
import { Node, NodeConfig } from './Node.js';
|
import { Node, NodeConfig } from './Node';
|
||||||
import {
|
import {
|
||||||
getNumberValidator,
|
getNumberValidator,
|
||||||
getNumberOrAutoValidator,
|
getNumberOrAutoValidator,
|
||||||
getStringValidator,
|
getStringValidator,
|
||||||
getBooleanValidator,
|
getBooleanValidator,
|
||||||
getStringOrGradientValidator,
|
getStringOrGradientValidator,
|
||||||
} from './Validators.js';
|
} from './Validators';
|
||||||
|
|
||||||
import { Context, SceneContext } from './Context.js';
|
import { Context, SceneContext } from './Context';
|
||||||
import { _registerNode } from './Global.js';
|
import { _registerNode } from './Global';
|
||||||
import * as PointerEvents from './PointerEvents.js';
|
import * as PointerEvents from './PointerEvents';
|
||||||
|
|
||||||
import { GetSet, Vector2d } from './types';
|
import { GetSet, Vector2d } from './types';
|
||||||
import { HitCanvas, SceneCanvas } from './Canvas.js';
|
import { HitCanvas, SceneCanvas } from './Canvas';
|
||||||
|
|
||||||
// hack from here https://stackoverflow.com/questions/52667959/what-is-the-purpose-of-bivariancehack-in-typescript-types/52668133#52668133
|
// hack from here https://stackoverflow.com/questions/52667959/what-is-the-purpose-of-bivariancehack-in-typescript-types/52668133#52668133
|
||||||
export type ShapeConfigHandler<TTarget> = {
|
export type ShapeConfigHandler<TTarget> = {
|
||||||
|
|||||||
21
src/Stage.ts
21
src/Stage.ts
@@ -1,14 +1,14 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Factory } from './Factory.js';
|
import { Factory } from './Factory';
|
||||||
import { Container, ContainerConfig } from './Container.js';
|
import { Container, ContainerConfig } from './Container';
|
||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { SceneCanvas, HitCanvas } from './Canvas.js';
|
import { SceneCanvas, HitCanvas } from './Canvas';
|
||||||
import { GetSet, Vector2d } from './types';
|
import { GetSet, Vector2d } from './types';
|
||||||
import { Shape } from './Shape.js';
|
import { Shape } from './Shape';
|
||||||
import { Layer } from './Layer.js';
|
import { Layer } from './Layer';
|
||||||
import { DD } from './DragAndDrop.js';
|
import { DD } from './DragAndDrop';
|
||||||
import { _registerNode } from './Global.js';
|
import { _registerNode } from './Global';
|
||||||
import * as PointerEvents from './PointerEvents.js';
|
import * as PointerEvents from './PointerEvents';
|
||||||
|
|
||||||
export interface StageConfig extends ContainerConfig {
|
export interface StageConfig extends ContainerConfig {
|
||||||
container: HTMLDivElement | string;
|
container: HTMLDivElement | string;
|
||||||
@@ -464,7 +464,6 @@ export class Stage extends Container<Layer> {
|
|||||||
this._fire(CONTENT_MOUSEOUT, { evt: evt });
|
this._fire(CONTENT_MOUSEOUT, { evt: evt });
|
||||||
}
|
}
|
||||||
_mousemove(evt) {
|
_mousemove(evt) {
|
||||||
|
|
||||||
this.setPointersPositions(evt);
|
this.setPointersPositions(evt);
|
||||||
var pointerId = Util._getFirstPointerId(evt);
|
var pointerId = Util._getFirstPointerId(evt);
|
||||||
var targetShape = this.targetShape?.getStage() ? this.targetShape : null;
|
var targetShape = this.targetShape?.getStage() ? this.targetShape : null;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
import { Animation } from './Animation.js';
|
import { Animation } from './Animation';
|
||||||
import { Node, NodeConfig } from './Node.js';
|
import { Node, NodeConfig } from './Node';
|
||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { Line } from './shapes/Line';
|
import { Line } from './shapes/Line';
|
||||||
|
|
||||||
var blacklist = {
|
var blacklist = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { IRect, RGB, RGBA, Vector2d } from './types';
|
import { IRect, RGB, RGBA, Vector2d } from './types';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Konva } from './Global.js';
|
import { Konva } from './Global';
|
||||||
import { Util } from './Util.js';
|
import { Util } from './Util';
|
||||||
|
|
||||||
function _formatValue(val: any) {
|
function _formatValue(val: any) {
|
||||||
if (Util._isString(val)) {
|
if (Util._isString(val)) {
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
// what is core parts of Konva?
|
// what is core parts of Konva?
|
||||||
import { Konva as Global } from './Global.js';
|
import { Konva as Global } from './Global';
|
||||||
|
|
||||||
import { Util, Transform } from './Util.js';
|
import { Util, Transform } from './Util';
|
||||||
import { Node, ids, names } from './Node.js';
|
import { Node, ids, names } from './Node';
|
||||||
import { Container } from './Container.js';
|
import { Container } from './Container';
|
||||||
|
|
||||||
import { Stage, stages } from './Stage.js';
|
import { Stage, stages } from './Stage';
|
||||||
|
|
||||||
import { Layer } from './Layer.js';
|
import { Layer } from './Layer';
|
||||||
import { FastLayer } from './FastLayer.js';
|
import { FastLayer } from './FastLayer';
|
||||||
|
|
||||||
import { Group } from './Group.js';
|
import { Group } from './Group';
|
||||||
|
|
||||||
import { DD } from './DragAndDrop.js';
|
import { DD } from './DragAndDrop';
|
||||||
|
|
||||||
import { Shape, shapes } from './Shape.js';
|
import { Shape, shapes } from './Shape';
|
||||||
|
|
||||||
import { Animation } from './Animation.js';
|
import { Animation } from './Animation';
|
||||||
import { Tween, Easings } from './Tween.js';
|
import { Tween, Easings } from './Tween';
|
||||||
|
|
||||||
import { Context } from './Context.js';
|
import { Context } from './Context';
|
||||||
import { Canvas } from './Canvas.js';
|
import { Canvas } from './Canvas';
|
||||||
|
|
||||||
export const Konva = Util._assign(Global, {
|
export const Konva = Util._assign(Global, {
|
||||||
Util,
|
Util,
|
||||||
|
|||||||
@@ -1,46 +1,46 @@
|
|||||||
// we need to import core of the Konva and then extend it with all additional objects
|
// we need to import core of the Konva and then extend it with all additional objects
|
||||||
|
|
||||||
import { Konva as Core } from './_CoreInternals.js';
|
import { Konva as Core } from './_CoreInternals';
|
||||||
|
|
||||||
// shapes
|
// shapes
|
||||||
import { Arc } from './shapes/Arc.js';
|
import { Arc } from './shapes/Arc';
|
||||||
import { Arrow } from './shapes/Arrow.js';
|
import { Arrow } from './shapes/Arrow';
|
||||||
import { Circle } from './shapes/Circle.js';
|
import { Circle } from './shapes/Circle';
|
||||||
import { Ellipse } from './shapes/Ellipse.js';
|
import { Ellipse } from './shapes/Ellipse';
|
||||||
import { Image } from './shapes/Image.js';
|
import { Image } from './shapes/Image';
|
||||||
import { Label, Tag } from './shapes/Label.js';
|
import { Label, Tag } from './shapes/Label';
|
||||||
import { Line } from './shapes/Line.js';
|
import { Line } from './shapes/Line';
|
||||||
import { Path } from './shapes/Path.js';
|
import { Path } from './shapes/Path';
|
||||||
import { Rect } from './shapes/Rect.js';
|
import { Rect } from './shapes/Rect';
|
||||||
import { RegularPolygon } from './shapes/RegularPolygon.js';
|
import { RegularPolygon } from './shapes/RegularPolygon';
|
||||||
import { Ring } from './shapes/Ring.js';
|
import { Ring } from './shapes/Ring';
|
||||||
import { Sprite } from './shapes/Sprite.js';
|
import { Sprite } from './shapes/Sprite';
|
||||||
import { Star } from './shapes/Star.js';
|
import { Star } from './shapes/Star';
|
||||||
import { Text } from './shapes/Text.js';
|
import { Text } from './shapes/Text';
|
||||||
import { TextPath } from './shapes/TextPath.js';
|
import { TextPath } from './shapes/TextPath';
|
||||||
import { Transformer } from './shapes/Transformer.js';
|
import { Transformer } from './shapes/Transformer';
|
||||||
import { Wedge } from './shapes/Wedge.js';
|
import { Wedge } from './shapes/Wedge';
|
||||||
|
|
||||||
// filters
|
// filters
|
||||||
import { Blur } from './filters/Blur.js';
|
import { Blur } from './filters/Blur';
|
||||||
import { Brighten } from './filters/Brighten.js';
|
import { Brighten } from './filters/Brighten';
|
||||||
import { Contrast } from './filters/Contrast.js';
|
import { Contrast } from './filters/Contrast';
|
||||||
import { Emboss } from './filters/Emboss.js';
|
import { Emboss } from './filters/Emboss';
|
||||||
import { Enhance } from './filters/Enhance.js';
|
import { Enhance } from './filters/Enhance';
|
||||||
import { Grayscale } from './filters/Grayscale.js';
|
import { Grayscale } from './filters/Grayscale';
|
||||||
import { HSL } from './filters/HSL.js';
|
import { HSL } from './filters/HSL';
|
||||||
import { HSV } from './filters/HSV.js';
|
import { HSV } from './filters/HSV';
|
||||||
import { Invert } from './filters/Invert.js';
|
import { Invert } from './filters/Invert';
|
||||||
import { Kaleidoscope } from './filters/Kaleidoscope.js';
|
import { Kaleidoscope } from './filters/Kaleidoscope';
|
||||||
import { Mask } from './filters/Mask.js';
|
import { Mask } from './filters/Mask';
|
||||||
import { Noise } from './filters/Noise.js';
|
import { Noise } from './filters/Noise';
|
||||||
import { Pixelate } from './filters/Pixelate.js';
|
import { Pixelate } from './filters/Pixelate';
|
||||||
import { Posterize } from './filters/Posterize.js';
|
import { Posterize } from './filters/Posterize';
|
||||||
import { RGB } from './filters/RGB.js';
|
import { RGB } from './filters/RGB';
|
||||||
import { RGBA } from './filters/RGBA.js';
|
import { RGBA } from './filters/RGBA';
|
||||||
import { Sepia } from './filters/Sepia.js';
|
import { Sepia } from './filters/Sepia';
|
||||||
import { Solarize } from './filters/Solarize.js';
|
import { Solarize } from './filters/Solarize';
|
||||||
import { Threshold } from './filters/Threshold.js';
|
import { Threshold } from './filters/Threshold';
|
||||||
|
|
||||||
export const Konva = Core.Util._assign(Core, {
|
export const Konva = Core.Util._assign(Core, {
|
||||||
Arc,
|
Arc,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
/*
|
/*
|
||||||
the Gauss filter
|
the Gauss filter
|
||||||
master repo: https://github.com/pavelpower/kineticjsGaussFilter
|
master repo: https://github.com/pavelpower/kineticjsGaussFilter
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Brighten Filter.
|
* Brighten Filter.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
/**
|
/**
|
||||||
* Contrast Filter.
|
* Contrast Filter.
|
||||||
* @function
|
* @function
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
/**
|
/**
|
||||||
* Emboss Filter.
|
* Emboss Filter.
|
||||||
* Pixastic Lib - Emboss filter - v0.1.0
|
* Pixastic Lib - Emboss filter - v0.1.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
function remap(fromValue, fromMin, fromMax, toMin, toMax) {
|
function remap(fromValue, fromMin, fromMax, toMin, toMax) {
|
||||||
// Compute the range of the data
|
// Compute the range of the data
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Filter } from '../Node.js';
|
import { Filter } from '../Node';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grayscale Filter
|
* Grayscale Filter
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
Factory.addGetterSetter(
|
Factory.addGetterSetter(
|
||||||
Node,
|
Node,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HSV Filter. Adjusts the hue, saturation and value
|
* HSV Filter. Adjusts the hue, saturation and value
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Filter } from '../Node.js';
|
import { Filter } from '../Node';
|
||||||
/**
|
/**
|
||||||
* Invert Filter
|
* Invert Filter
|
||||||
* @function
|
* @function
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ToPolar Filter. Converts image data to polar coordinates. Performs
|
* ToPolar Filter. Converts image data to polar coordinates. Performs
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
function pixelAt(idata, x, y) {
|
function pixelAt(idata, x, y) {
|
||||||
var idx = (y * idata.width + x) * 4;
|
var idx = (y * idata.width + x) * 4;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Noise Filter. Randomly adds or substracts to the color channels
|
* Noise Filter. Randomly adds or substracts to the color channels
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*eslint-disable max-depth */
|
/*eslint-disable max-depth */
|
||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pixelate Filter. Averages groups of pixels and redraws
|
* Pixelate Filter. Averages groups of pixels and redraws
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
/**
|
/**
|
||||||
* Posterize Filter. Adjusts the channels so that there are no more
|
* Posterize Filter. Adjusts the channels so that there are no more
|
||||||
* than n different values for that channel. This is also applied
|
* than n different values for that channel. This is also applied
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { RGBComponent } from '../Validators.js';
|
import { RGBComponent } from '../Validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RGB Filter
|
* RGB Filter
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { RGBComponent } from '../Validators.js';
|
import { RGBComponent } from '../Validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RGBA Filter
|
* RGBA Filter
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Filter } from '../Node.js';
|
import { Filter } from '../Node';
|
||||||
|
|
||||||
// based on https://stackoverflow.com/questions/1061093/how-is-a-sepia-tone-created
|
// based on https://stackoverflow.com/questions/1061093/how-is-a-sepia-tone-created
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Filter } from '../Node.js';
|
import { Filter } from '../Node';
|
||||||
/**
|
/**
|
||||||
* Solarize Filter
|
* Solarize Filter
|
||||||
* Pixastic Lib - Solarize filter - v0.1.0
|
* Pixastic Lib - Solarize filter - v0.1.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node, Filter } from '../Node.js';
|
import { Node, Filter } from '../Node';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
/**
|
/**
|
||||||
* Threshold Filter. Pushes any value above the mid point to
|
* Threshold Filter. Pushes any value above the mid point to
|
||||||
* the max and any value below the mid point to the min.
|
* the max and any value below the mid point to the min.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// main entry for umd build for rollup
|
// main entry for umd build for rollup
|
||||||
import { Konva } from './_FullInternals.js';
|
import { Konva } from './_FullInternals';
|
||||||
import * as canvas from 'canvas';
|
import * as canvas from 'canvas';
|
||||||
|
|
||||||
const isNode = typeof global.document === 'undefined';
|
const isNode = typeof global.document === 'undefined';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { Konva } from '../Global.js';
|
import { Konva } from '../Global';
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { getNumberValidator, getBooleanValidator } from '../Validators.js';
|
import { getNumberValidator, getBooleanValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
export interface ArcConfig extends ShapeConfig {
|
export interface ArcConfig extends ShapeConfig {
|
||||||
angle: number;
|
angle: number;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Line, LineConfig } from './Line.js';
|
import { Line, LineConfig } from './Line';
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
export interface ArrowConfig extends LineConfig {
|
export interface ArrowConfig extends LineConfig {
|
||||||
points: number[];
|
points: number[];
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
export interface CircleConfig extends ShapeConfig {
|
export interface CircleConfig extends ShapeConfig {
|
||||||
radius?: number;
|
radius?: number;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet, Vector2d } from '../types';
|
import { GetSet, Vector2d } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet, IRect } from '../types';
|
import { GetSet, IRect } from '../types';
|
||||||
import { Context } from '../Context.js';
|
import { Context } from '../Context';
|
||||||
|
|
||||||
export interface ImageConfig extends ShapeConfig {
|
export interface ImageConfig extends ShapeConfig {
|
||||||
image: CanvasImageSource | undefined;
|
image: CanvasImageSource | undefined;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { Group } from '../Group.js';
|
import { Group } from '../Group';
|
||||||
import { ContainerConfig } from '../Container.js';
|
import { ContainerConfig } from '../Container';
|
||||||
import {
|
import {
|
||||||
getNumberOrArrayOfNumbersValidator,
|
getNumberOrArrayOfNumbersValidator,
|
||||||
getNumberValidator,
|
getNumberValidator,
|
||||||
} from '../Validators.js';
|
} from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { Text } from './Text.js';
|
import { Text } from './Text';
|
||||||
|
|
||||||
export interface LabelConfig extends ContainerConfig {}
|
export interface LabelConfig extends ContainerConfig {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { getNumberValidator, getNumberArrayValidator } from '../Validators.js';
|
import { getNumberValidator, getNumberArrayValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { Context } from '../Context.js';
|
import { Context } from '../Context';
|
||||||
|
|
||||||
export interface LineConfig extends ShapeConfig {
|
export interface LineConfig extends ShapeConfig {
|
||||||
points?: number[];
|
points?: number[];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { getNumberOrArrayOfNumbersValidator } from '../Validators.js';
|
import { getNumberOrArrayOfNumbersValidator } from '../Validators';
|
||||||
export interface RectConfig extends ShapeConfig {
|
export interface RectConfig extends ShapeConfig {
|
||||||
cornerRadius?: number | number[];
|
cornerRadius?: number | number[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
export interface RegularPolygonConfig extends ShapeConfig {
|
export interface RegularPolygonConfig extends ShapeConfig {
|
||||||
sides: number;
|
sides: number;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
export interface RingConfig extends ShapeConfig {
|
export interface RingConfig extends ShapeConfig {
|
||||||
innerRadius: number;
|
innerRadius: number;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { Animation } from '../Animation.js';
|
import { Animation } from '../Animation';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { Konva } from '../Global.js';
|
import { Konva } from '../Global';
|
||||||
import {
|
import {
|
||||||
getNumberValidator,
|
getNumberValidator,
|
||||||
getStringValidator,
|
getStringValidator,
|
||||||
getNumberOrAutoValidator,
|
getNumberOrAutoValidator,
|
||||||
getBooleanValidator,
|
getBooleanValidator,
|
||||||
} from '../Validators.js';
|
} from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Util } from '../Util.js';
|
import { Util } from '../Util';
|
||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { Path } from './Path.js';
|
import { Path } from './Path';
|
||||||
import { Text, stringToArray } from './Text.js';
|
import { Text, stringToArray } from './Text';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet, Vector2d } from '../types';
|
import { GetSet, Vector2d } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { Util, Transform } from '../Util.js';
|
import { Util, Transform } from '../Util';
|
||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Node } from '../Node.js';
|
import { Node } from '../Node';
|
||||||
import { Shape } from '../Shape.js';
|
import { Shape } from '../Shape';
|
||||||
import { Rect } from './Rect.js';
|
import { Rect } from './Rect';
|
||||||
import { Group } from '../Group.js';
|
import { Group } from '../Group';
|
||||||
import { ContainerConfig } from '../Container.js';
|
import { ContainerConfig } from '../Container';
|
||||||
import { Konva } from '../Global.js';
|
import { Konva } from '../Global';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet, IRect, Vector2d } from '../types';
|
import { GetSet, IRect, Vector2d } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Factory } from '../Factory.js';
|
import { Factory } from '../Factory';
|
||||||
import { Shape, ShapeConfig } from '../Shape.js';
|
import { Shape, ShapeConfig } from '../Shape';
|
||||||
import { Konva } from '../Global.js';
|
import { Konva } from '../Global';
|
||||||
import { getNumberValidator } from '../Validators.js';
|
import { getNumberValidator } from '../Validators';
|
||||||
import { _registerNode } from '../Global.js';
|
import { _registerNode } from '../Global';
|
||||||
|
|
||||||
import { GetSet } from '../types';
|
import { GetSet } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { assert } from 'chai';
|
import { assert } from 'chai';
|
||||||
import KonvaModule from '../../src/index';
|
import KonvaModule from '../../lib/index';
|
||||||
import '../../src/index-node';
|
import '../../lib/index-node';
|
||||||
|
|
||||||
export const Konva = KonvaModule;
|
export const Konva = KonvaModule;
|
||||||
|
|
||||||
@@ -10,8 +10,8 @@ Konva.enableTrace = true;
|
|||||||
Konva.showWarnings = true;
|
Konva.showWarnings = true;
|
||||||
|
|
||||||
import { imagediff } from './imagediff';
|
import { imagediff } from './imagediff';
|
||||||
import { Layer } from '../../src/Layer.js';
|
import { Layer } from '../../lib/Layer.js';
|
||||||
import { Stage } from '../../src/Stage.js';
|
import { Stage } from '../../lib/Stage.js';
|
||||||
|
|
||||||
// reset some data
|
// reset some data
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user