mirror of
https://github.com/konvajs/konva.git
synced 2025-12-26 22:55:44 +08:00
Allow line points to be of type TypedArray.
This commit is contained in:
@@ -142,6 +142,9 @@ export function getFunctionValidator() {
|
||||
export function getNumberArrayValidator() {
|
||||
if (Konva.isUnminified) {
|
||||
return function (val: any, attr: string) {
|
||||
if (val instanceof Uint8Array || val instanceof Uint16Array || val instanceof Uint32Array || val instanceof Uint8ClampedArray) {
|
||||
return val
|
||||
}
|
||||
if (!Util._isArray(val)) {
|
||||
Util.warn(
|
||||
_formatValue(val) +
|
||||
|
||||
@@ -51,7 +51,7 @@ function expandPoints(p, tension) {
|
||||
}
|
||||
|
||||
export interface LineConfig extends ShapeConfig {
|
||||
points?: number[];
|
||||
points?: number[] | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray;
|
||||
tension?: number;
|
||||
closed?: boolean;
|
||||
bezier?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user