scriptable-testlab
Version:
A lightweight, efficient tool designed to manage and update scripts for Scriptable.
40 lines • 864 B
JavaScript
import { AbsLinearGradient } from "scriptable-abstract";
const DEFAULT_STATE = {
colors: [],
locations: [],
startPoint: { x: 0, y: 0 },
endPoint: { x: 1, y: 1 }
};
class MockLinearGradient extends AbsLinearGradient {
constructor() {
super(DEFAULT_STATE);
}
get colors() {
return [...this.state.colors];
}
set colors(value) {
this.setState({ colors: value });
}
get locations() {
return [...this.state.locations];
}
set locations(value) {
this.setState({ locations: value });
}
get startPoint() {
return { ...this.state.startPoint };
}
set startPoint(value) {
this.setState({ startPoint: value });
}
get endPoint() {
return { ...this.state.endPoint };
}
set endPoint(value) {
this.setState({ endPoint: value });
}
}
export {
MockLinearGradient
};
//# sourceMappingURL=gradient.js.map