Comparing version 8.3.11 to 8.3.12
@@ -6,3 +6,3 @@ export declare const Factory: { | ||
overWriteSetter(constructor: any, attr: any, validator?: any, after?: any): void; | ||
addComponentsGetterSetter(constructor: any, attr: any, components: any, validator?: any, after?: any): void; | ||
addComponentsGetterSetter(constructor: any, attr: string, components: Array<string>, validator?: Function, after?: Function): void; | ||
addOverloadedGetterSetter(constructor: any, attr: any): void; | ||
@@ -9,0 +9,0 @@ addDeprecatedGetterSetter(constructor: any, attr: any, def: any, validator: any): void; |
@@ -66,2 +66,7 @@ "use strict"; | ||
} | ||
if (!val) { | ||
components.forEach((component) => { | ||
this._setAttr(attr + capitalize(component), undefined); | ||
}); | ||
} | ||
this._fireChangeEvent(attr, oldVal, val); | ||
@@ -68,0 +73,0 @@ if (after) { |
@@ -19,3 +19,3 @@ "use strict"; | ||
_global: exports.glob, | ||
version: '8.3.11', | ||
version: '8.3.12', | ||
isBrowser: detectBrowser(), | ||
@@ -22,0 +22,0 @@ isUnminified: /param/.test(function (param) { }.toString()), |
@@ -182,3 +182,3 @@ import { Transform } from './Util'; | ||
isAncestorOf(node: Node): boolean; | ||
findAncestor(selector?: string, includeSelf?: boolean, stopNode?: Container): any; | ||
findAncestor(selector?: string, includeSelf?: boolean, stopNode?: Container): Node<NodeConfig>; | ||
_isMatch(selector: string | Function): any; | ||
@@ -307,3 +307,3 @@ getLayer(): Layer | null; | ||
zIndex: GetSet<number, this>; | ||
scale: GetSet<Vector2d, this>; | ||
scale: GetSet<Vector2d | undefined, this>; | ||
scaleX: GetSet<number, this>; | ||
@@ -310,0 +310,0 @@ scaleY: GetSet<number, this>; |
@@ -991,3 +991,3 @@ "use strict"; | ||
delete config.callback; | ||
this.toCanvas(config).toBlob(blob => { | ||
this.toCanvas(config).toBlob((blob) => { | ||
resolve(blob); | ||
@@ -994,0 +994,0 @@ callback === null || callback === void 0 ? void 0 : callback(blob); |
@@ -5,3 +5,3 @@ import { Shape, ShapeConfig } from '../Shape'; | ||
export interface LineConfig extends ShapeConfig { | ||
points?: number[]; | ||
points?: number[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; | ||
tension?: number; | ||
@@ -8,0 +8,0 @@ closed?: boolean; |
@@ -307,3 +307,3 @@ "use strict"; | ||
textWidth = Math.max(textWidth, lineWidth); | ||
if (this._shouldHandleEllipsis(currentHeightPx)) { | ||
if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) { | ||
this._tryToAddEllipsisToLastLine(); | ||
@@ -310,0 +310,0 @@ } |
@@ -170,3 +170,3 @@ "use strict"; | ||
} | ||
if (pathCmd === {} || p0 === undefined) { | ||
if (Object.keys(pathCmd).length === 0 || p0 === undefined) { | ||
return undefined; | ||
@@ -173,0 +173,0 @@ } |
@@ -89,8 +89,3 @@ import { Transform } from '../Util'; | ||
toObject(): any; | ||
getClientRect(): { | ||
x: number; | ||
y: number; | ||
width: number; | ||
height: number; | ||
}; | ||
getClientRect(): IRect; | ||
nodes: GetSet<Node[], this>; | ||
@@ -97,0 +92,0 @@ enabledAnchors: GetSet<string[], this>; |
@@ -903,3 +903,8 @@ "use strict"; | ||
getClientRect() { | ||
return { x: 0, y: 0, width: 0, height: 0 }; | ||
if (this.nodes().length > 0) { | ||
return super.getClientRect(); | ||
} | ||
else { | ||
return { x: 0, y: 0, width: 0, height: 0 }; | ||
} | ||
} | ||
@@ -906,0 +911,0 @@ } |
@@ -134,2 +134,6 @@ "use strict"; | ||
return function (val, attr) { | ||
const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null; | ||
if (TypedArray && val instanceof TypedArray) { | ||
return val; | ||
} | ||
if (!Util_1.Util._isArray(val)) { | ||
@@ -175,2 +179,5 @@ Util_1.Util.warn(_formatValue(val) + | ||
return function (val, attr) { | ||
if (val === undefined || val === null) { | ||
return val; | ||
} | ||
if (!Util_1.Util.isObject(val)) { | ||
@@ -177,0 +184,0 @@ Util_1.Util.warn(_formatValue(val) + |
@@ -6,3 +6,3 @@ export declare const Factory: { | ||
overWriteSetter(constructor: any, attr: any, validator?: any, after?: any): void; | ||
addComponentsGetterSetter(constructor: any, attr: any, components: any, validator?: any, after?: any): void; | ||
addComponentsGetterSetter(constructor: any, attr: string, components: Array<string>, validator?: Function, after?: Function): void; | ||
addOverloadedGetterSetter(constructor: any, attr: any): void; | ||
@@ -9,0 +9,0 @@ addDeprecatedGetterSetter(constructor: any, attr: any, def: any, validator: any): void; |
@@ -63,2 +63,7 @@ import { Util } from './Util.js'; | ||
} | ||
if (!val) { | ||
components.forEach((component) => { | ||
this._setAttr(attr + capitalize(component), undefined); | ||
}); | ||
} | ||
this._fireChangeEvent(attr, oldVal, val); | ||
@@ -65,0 +70,0 @@ if (after) { |
@@ -16,3 +16,3 @@ var PI_OVER_180 = Math.PI / 180; | ||
_global: glob, | ||
version: '8.3.11', | ||
version: '8.3.12', | ||
isBrowser: detectBrowser(), | ||
@@ -19,0 +19,0 @@ isUnminified: /param/.test(function (param) { }.toString()), |
@@ -182,3 +182,3 @@ import { Transform } from './Util'; | ||
isAncestorOf(node: Node): boolean; | ||
findAncestor(selector?: string, includeSelf?: boolean, stopNode?: Container): any; | ||
findAncestor(selector?: string, includeSelf?: boolean, stopNode?: Container): Node<NodeConfig>; | ||
_isMatch(selector: string | Function): any; | ||
@@ -307,3 +307,3 @@ getLayer(): Layer | null; | ||
zIndex: GetSet<number, this>; | ||
scale: GetSet<Vector2d, this>; | ||
scale: GetSet<Vector2d | undefined, this>; | ||
scaleX: GetSet<number, this>; | ||
@@ -310,0 +310,0 @@ scaleY: GetSet<number, this>; |
@@ -988,3 +988,3 @@ import { Util, Transform } from './Util.js'; | ||
delete config.callback; | ||
this.toCanvas(config).toBlob(blob => { | ||
this.toCanvas(config).toBlob((blob) => { | ||
resolve(blob); | ||
@@ -991,0 +991,0 @@ callback === null || callback === void 0 ? void 0 : callback(blob); |
@@ -5,3 +5,3 @@ import { Shape, ShapeConfig } from '../Shape'; | ||
export interface LineConfig extends ShapeConfig { | ||
points?: number[]; | ||
points?: number[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; | ||
tension?: number; | ||
@@ -8,0 +8,0 @@ closed?: boolean; |
@@ -303,3 +303,3 @@ import { Util } from '../Util.js'; | ||
textWidth = Math.max(textWidth, lineWidth); | ||
if (this._shouldHandleEllipsis(currentHeightPx)) { | ||
if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) { | ||
this._tryToAddEllipsisToLastLine(); | ||
@@ -306,0 +306,0 @@ } |
@@ -167,3 +167,3 @@ import { Util } from '../Util.js'; | ||
} | ||
if (pathCmd === {} || p0 === undefined) { | ||
if (Object.keys(pathCmd).length === 0 || p0 === undefined) { | ||
return undefined; | ||
@@ -170,0 +170,0 @@ } |
@@ -89,8 +89,3 @@ import { Transform } from '../Util'; | ||
toObject(): any; | ||
getClientRect(): { | ||
x: number; | ||
y: number; | ||
width: number; | ||
height: number; | ||
}; | ||
getClientRect(): IRect; | ||
nodes: GetSet<Node[], this>; | ||
@@ -97,0 +92,0 @@ enabledAnchors: GetSet<string[], this>; |
@@ -900,3 +900,8 @@ import { Util, Transform } from '../Util.js'; | ||
getClientRect() { | ||
return { x: 0, y: 0, width: 0, height: 0 }; | ||
if (this.nodes().length > 0) { | ||
return super.getClientRect(); | ||
} | ||
else { | ||
return { x: 0, y: 0, width: 0, height: 0 }; | ||
} | ||
} | ||
@@ -903,0 +908,0 @@ } |
@@ -123,2 +123,6 @@ import { Konva } from './Global.js'; | ||
return function (val, attr) { | ||
const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null; | ||
if (TypedArray && val instanceof TypedArray) { | ||
return val; | ||
} | ||
if (!Util._isArray(val)) { | ||
@@ -162,2 +166,5 @@ Util.warn(_formatValue(val) + | ||
return function (val, attr) { | ||
if (val === undefined || val === null) { | ||
return val; | ||
} | ||
if (!Util.isObject(val)) { | ||
@@ -164,0 +171,0 @@ Util.warn(_formatValue(val) + |
{ | ||
"name": "konva", | ||
"version": "8.3.11", | ||
"version": "8.3.12", | ||
"author": "Anton Lavrenov", | ||
@@ -52,3 +52,3 @@ "files": [ | ||
"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 && npm run test:import", | ||
"test:node": "ts-mocha -p ./test/tsconfig.json test/unit/**/*.ts --exit && npm run test:import", | ||
"test:watch": "rm -rf ./parcel-cache && parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/sandbox.html", | ||
@@ -92,6 +92,6 @@ "tsc": "tsc --removeComments && tsc --build ./tsconfig-cmj.json", | ||
"devDependencies": { | ||
"@parcel/transformer-image": "2.6.0", | ||
"@size-limit/preset-big-lib": "^7.0.8", | ||
"@parcel/transformer-image": "2.7.0", | ||
"@size-limit/preset-big-lib": "^8.0.0", | ||
"@types/mocha": "^9.1.1", | ||
"canvas": "^2.9.1", | ||
"canvas": "^2.9.3", | ||
"chai": "4.3.6", | ||
@@ -110,15 +110,15 @@ "filehound": "^1.17.6", | ||
"gulp-util": "^3.0.8", | ||
"mocha": "9.2.2", | ||
"mocha": "10.0.0", | ||
"mocha-headless-chrome": "^4.0.0", | ||
"parcel": "2.6.0", | ||
"parcel": "2.7.0", | ||
"process": "^0.11.10", | ||
"rollup": "^2.75.0", | ||
"rollup": "^2.77.2", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.6.3", | ||
"rollup-plugin-typescript2": "^0.31.2", | ||
"size-limit": "^7.0.8", | ||
"ts-mocha": "^9.0.2", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.6.3" | ||
"rollup-plugin-typescript2": "^0.32.1", | ||
"size-limit": "^8.0.0", | ||
"ts-mocha": "^10.0.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.7.4" | ||
}, | ||
@@ -125,0 +125,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1760611
44369