Merge branch 'master' of github.com:konvajs/konva into master

This commit is contained in:
Anton Lavrenov 2022-08-09 09:47:53 -05:00
commit 94ac6f3684
2 changed files with 7 additions and 1 deletions

View File

@ -142,6 +142,12 @@ export function getFunctionValidator() {
export function getNumberArrayValidator() {
if (Konva.isUnminified) {
return function (val: any, attr: string) {
// Retrieve TypedArray constructor as found in MDN (if TypedArray is available)
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#description
const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null;
if (TypedArray && val instanceof TypedArray) {
return val
}
if (!Util._isArray(val)) {
Util.warn(
_formatValue(val) +

View File

@ -51,7 +51,7 @@ function expandPoints(p, tension) {
}
export interface LineConfig extends ShapeConfig {
points?: number[];
points?: number[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
tension?: number;
closed?: boolean;
bezier?: boolean;