@operato/scene-progressbar 9.1.1 → 10.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/factories/index.d.ts +1 -0
- package/dist/factories/index.js +6 -0
- package/dist/factories/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/progress-circle.d.ts +231 -4
- package/dist/progress-circle.js.map +1 -1
- package/dist/progress-horizontal.d.ts +467 -4
- package/dist/progress-horizontal.js.map +1 -1
- package/dist/progress-vertical.d.ts +467 -4
- package/dist/progress-vertical.js.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { registerRealObjectFactory, RealObjectPlane2D } from '@hatiolab/things-scene';
|
|
2
|
+
const plane2D = (component) => new RealObjectPlane2D(component);
|
|
3
|
+
registerRealObjectFactory('progress-circle', plane2D);
|
|
4
|
+
registerRealObjectFactory('progress-horizontal', plane2D);
|
|
5
|
+
registerRealObjectFactory('progress-vertical', plane2D);
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAErF,MAAM,OAAO,GAAG,CAAC,SAAc,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAA;AACpE,yBAAyB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;AACrD,yBAAyB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAA;AACzD,yBAAyB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA","sourcesContent":["import { registerRealObjectFactory, RealObjectPlane2D } from '@hatiolab/things-scene'\n\nconst plane2D = (component: any) => new RealObjectPlane2D(component)\nregisterRealObjectFactory('progress-circle', plane2D)\nregisterRealObjectFactory('progress-horizontal', plane2D)\nregisterRealObjectFactory('progress-vertical', plane2D)\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA","sourcesContent":["import './factories/index.js'\n\nexport { default as ProgressCircle } from './progress-circle.js'\nexport { default as ProgressVertical } from './progress-vertical.js'\nexport { default as ProgressHorizontal } from './progress-horizontal.js'\n"]}
|
|
@@ -1,8 +1,235 @@
|
|
|
1
|
-
import { ComponentNature, Ellipse } from '@hatiolab/things-scene';
|
|
1
|
+
import { Component, ComponentNature, Ellipse } from '@hatiolab/things-scene';
|
|
2
2
|
declare const ProgressCircle_base: (new (...args: any[]) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
_lastValue: number;
|
|
4
|
+
_anim_alpha: number;
|
|
5
|
+
_value_substitutor: any;
|
|
6
|
+
animOnValueChange(value: any, animFromBase: boolean | undefined, base: any): void;
|
|
7
|
+
dispose(): void;
|
|
8
|
+
onchange(after: any, before: any): void;
|
|
9
|
+
get animAlpha(): number;
|
|
10
|
+
get animValue(): number;
|
|
11
|
+
defaultValueSubstitutor(): any;
|
|
12
|
+
get valueSubstitutor(): any;
|
|
13
|
+
get value(): number;
|
|
14
|
+
set value(value: number): any;
|
|
15
|
+
_app: any;
|
|
16
|
+
_model: any;
|
|
17
|
+
_state: any;
|
|
18
|
+
_delta: any;
|
|
19
|
+
_animation: any;
|
|
20
|
+
_animate: any;
|
|
21
|
+
_parent: any;
|
|
22
|
+
_disposed: any;
|
|
23
|
+
_textHidden: any;
|
|
24
|
+
_text_substitutor: any;
|
|
25
|
+
_mappings: any;
|
|
26
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
27
|
+
_cachedState: any;
|
|
28
|
+
updatedAt: any;
|
|
29
|
+
fontSize: any;
|
|
30
|
+
__cache__: any;
|
|
31
|
+
created(): void;
|
|
32
|
+
added(parent: any): void;
|
|
33
|
+
removed(parent: any): void;
|
|
34
|
+
ready(): Promise<void>;
|
|
35
|
+
touch(): void;
|
|
36
|
+
clearCache(...attrs: any[]): void;
|
|
37
|
+
removeSelf(completely: any): void;
|
|
38
|
+
resetAnimation(): void;
|
|
39
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
40
|
+
get disposed(): boolean;
|
|
41
|
+
isLayer(): boolean;
|
|
42
|
+
isGroup(): boolean;
|
|
43
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
44
|
+
isLine(): boolean;
|
|
45
|
+
isRoot(): boolean;
|
|
46
|
+
isRootModel(): boolean;
|
|
47
|
+
is3dish(): boolean;
|
|
48
|
+
get is3dMode(): boolean;
|
|
49
|
+
isIn3DSpace(): boolean;
|
|
50
|
+
isTemplate(): boolean;
|
|
51
|
+
isHTMLElement(): boolean;
|
|
52
|
+
isConnectable(): boolean;
|
|
53
|
+
isIdentifiable(): boolean;
|
|
54
|
+
isPositionable(): boolean;
|
|
55
|
+
replaceRefids(replaceMap: any): void;
|
|
56
|
+
get(property: any): any;
|
|
57
|
+
set(props: any, propval?: any): any;
|
|
58
|
+
getState(property: any): any;
|
|
59
|
+
setState(props: any, propval?: any): any;
|
|
60
|
+
get model(): any;
|
|
61
|
+
get state(): any;
|
|
62
|
+
get hierarchy(): any;
|
|
63
|
+
get volatile(): never[];
|
|
64
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
65
|
+
contains(x: number, y: number): boolean;
|
|
66
|
+
move(offset: {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
}, ...args: boolean[]): void;
|
|
70
|
+
symmetryX(x?: number): void;
|
|
71
|
+
symmetryY(y: number): void;
|
|
72
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): {
|
|
73
|
+
left: any;
|
|
74
|
+
top: any;
|
|
75
|
+
width: any;
|
|
76
|
+
height: any;
|
|
77
|
+
};
|
|
78
|
+
adjustRotation(rotation: number, step: boolean): number;
|
|
79
|
+
outline(progress: number): any;
|
|
80
|
+
get bounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
81
|
+
set bounds(b: import("@hatiolab/things-scene").BOUNDS): any;
|
|
82
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
83
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
84
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
85
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
86
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
87
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
88
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
89
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
90
|
+
get path(): import("@hatiolab/things-scene").POINT[];
|
|
91
|
+
set path(p: import("@hatiolab/things-scene").POINT[]): any;
|
|
92
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
93
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
94
|
+
get mutable(): boolean;
|
|
95
|
+
get resizable(): boolean;
|
|
96
|
+
get rotatable(): boolean;
|
|
97
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
98
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
99
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
100
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
101
|
+
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
102
|
+
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
103
|
+
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
104
|
+
prepareIf(condition: boolean): void;
|
|
105
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
106
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
107
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
108
|
+
get strokeStyle(): any;
|
|
109
|
+
set strokeStyle(v: any): any;
|
|
110
|
+
get fillStyle(): any;
|
|
111
|
+
set fillStyle(v: any): any;
|
|
112
|
+
get fontColor(): string;
|
|
113
|
+
set fontColor(v: string): any;
|
|
114
|
+
get rotation(): number;
|
|
115
|
+
set rotation(v: number): any;
|
|
116
|
+
get decorators(): string[];
|
|
117
|
+
get decotag(): string;
|
|
118
|
+
get hidden(): boolean;
|
|
119
|
+
set hidden(v: boolean): any;
|
|
120
|
+
get tag(): string;
|
|
121
|
+
set tag(v: string): any;
|
|
122
|
+
get appendum(): any;
|
|
123
|
+
set appendum(v: any): any;
|
|
124
|
+
defaultTextSubstitutor(): string;
|
|
125
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any[][];
|
|
126
|
+
get font(): string;
|
|
127
|
+
get lineHeight(): number;
|
|
128
|
+
get textSubstitutor(): () => string;
|
|
129
|
+
get text(): string;
|
|
130
|
+
set text(v: string): any;
|
|
131
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
132
|
+
get textRotation(): number;
|
|
133
|
+
get textHidden(): boolean;
|
|
134
|
+
set textHidden(v: boolean): any;
|
|
135
|
+
get hasTextProperty(): boolean;
|
|
136
|
+
animate(opts: import("@hatiolab/things-scene").AnimationConfig): any;
|
|
137
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): void;
|
|
138
|
+
serialize(...others: any[]): string;
|
|
139
|
+
trim(): void;
|
|
140
|
+
closeScene(data: any): void;
|
|
141
|
+
delta(attr?: string | object, value?: any): any;
|
|
142
|
+
invalidate(): void;
|
|
143
|
+
get data(): any;
|
|
144
|
+
set data(v: any): any;
|
|
145
|
+
set tap(v: any): any;
|
|
146
|
+
get mappings(): any[];
|
|
147
|
+
get retention(): number;
|
|
148
|
+
get animation(): import("@hatiolab/things-scene").AnimationController | undefined;
|
|
149
|
+
get started(): boolean;
|
|
150
|
+
set started(v: boolean): any;
|
|
151
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
152
|
+
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
153
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
154
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
155
|
+
findAnchor(name: string): any;
|
|
156
|
+
isDescendible(container: Component): boolean;
|
|
157
|
+
getContext(component?: unknown): any;
|
|
158
|
+
get root(): Component;
|
|
159
|
+
get rootModel(): Component;
|
|
160
|
+
get parent(): Component;
|
|
161
|
+
set parent(v: Component): any;
|
|
162
|
+
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
163
|
+
get scalable(): boolean;
|
|
164
|
+
get stuck(): boolean;
|
|
165
|
+
get capturable(): boolean;
|
|
166
|
+
get position(): string;
|
|
167
|
+
get origin(): string;
|
|
168
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
169
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
170
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
171
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
172
|
+
prepareFillIf(condition: boolean): void;
|
|
173
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
174
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
175
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
176
|
+
mutatePath(beforeLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, afterLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, context?: any): void;
|
|
177
|
+
access(accessor: string): any;
|
|
178
|
+
substitute(template: string, data: any): string | undefined;
|
|
179
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
180
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
181
|
+
buildMappings(): void;
|
|
182
|
+
executeMappings(force?: boolean): void;
|
|
183
|
+
disposeMappings(): void;
|
|
184
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
185
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
186
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
188
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
189
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
190
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
197
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
198
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
199
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
200
|
+
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
201
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
202
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
203
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
204
|
+
trigger(name: string, ...args: any[]): any;
|
|
205
|
+
delegate_on(delegator: any): any;
|
|
206
|
+
delegate_off(delegator: any): any;
|
|
207
|
+
calculateBounds?(): void;
|
|
208
|
+
oncreate_element?(element: HTMLElement): void;
|
|
209
|
+
removeComponent(component: Component, ghost?: boolean): void;
|
|
210
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
211
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
212
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
213
|
+
findById(id: string): Component | undefined;
|
|
214
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
215
|
+
findAllById(id: string): Component[];
|
|
216
|
+
resize(): void;
|
|
217
|
+
fit(type?: string): void;
|
|
218
|
+
get components(): Component[] | undefined;
|
|
219
|
+
get layout(): any;
|
|
220
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
221
|
+
get isReady(): boolean;
|
|
222
|
+
get unitScale(): number;
|
|
223
|
+
get selected(): Component[];
|
|
224
|
+
set selected(_v: Component[]): any;
|
|
225
|
+
get focused(): Component | null;
|
|
226
|
+
set focused(_v: Component | null): any;
|
|
227
|
+
get hasSameParentForAllSelected(): boolean;
|
|
228
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
229
|
+
get fitMode(): string | undefined;
|
|
230
|
+
set fitMode(_v: string | undefined): any;
|
|
231
|
+
get element(): HTMLElement | null;
|
|
232
|
+
set element(_v: HTMLElement | null): any;
|
|
6
233
|
}) & typeof Ellipse;
|
|
7
234
|
export default class ProgressCircle extends ProgressCircle_base {
|
|
8
235
|
render(context: CanvasRenderingContext2D): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-circle.js","sourceRoot":"","sources":["../src/progress-circle.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEzG,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;SACd;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;SACjB;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,oBAAoB;YAC3B,IAAI,EAA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1B,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"progress-circle.js","sourceRoot":"","sources":["../src/progress-circle.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEzG,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;SACd;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;SACjB;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,oBAAoB;YAC3B,IAAI,EAAE,kBAAkB;SACzB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;SACrB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,IAAI,EAAE,iCAAiC;CACxC,CAAA;AAGc,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW,CAAC,OAAO,CAAC;IAC9D,MAAM,CAAC,OAAiC;QACtC,IAAI,EACF,UAAU,GAAG,CAAC,EACd,QAAQ,GAAG,GAAG,EACd,SAAS,GAAG,EAAE,EACd,gBAAgB,EAChB,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,YAAY,GAAG,KAAK,EACpB,YAAY,GAAG,KAAK,EACrB,GAAG,IAAI,CAAC,KAAK,CAAA;QAEd,IAAI,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AC,EAAE,EAAE,EAAE,CAAC,CAAA;QACxB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,CAAA;QAC9F,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEtB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,sBAAsB;QAEtB,OAAO,CAAC,OAAO,CACb,EAAE,EACF,EAAE,EACF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,CAAC,EACD,kBAAkB,EAClB,kBAAkB,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,OAAO,CACvE,CAAA;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1B,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IACD,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA5EoB,cAAc;IADlC,cAAc,CAAC,iBAAiB,CAAC;GACb,cAAc,CA4ElC;eA5EoB,cAAc","sourcesContent":["import { Component, ComponentNature, Ellipse, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value'\n },\n {\n type: 'number',\n label: 'start-angle',\n name: 'startAngle'\n },\n {\n type: 'number',\n label: 'end-angle',\n name: 'endAngle'\n },\n {\n type: 'color',\n label: 'blank-stroke-style',\n name: 'blankStrokeStyle'\n },\n {\n type: 'checkbox',\n label: 'packman-style',\n name: 'packmanStyle'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-circle'\n}\n\n@sceneComponent('progress-circle')\nexport default class ProgressCircle extends ValueHolder(Ellipse) {\n render(context: CanvasRenderingContext2D) {\n var {\n startAngle = 0,\n endAngle = 360,\n lineWidth = 20,\n blankStrokeStyle,\n cx,\n cy,\n rx,\n ry,\n packmanStyle = false,\n animFromBase = false\n } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n const RADIAN = 0.0174533 / Math.PI\n\n context.beginPath()\n this.drawStroke(context)\n // Angle마다 '-90'와 '-0.5 * Math.PI'가 있는 이유는 0도를 시계의 12시 방향으로 맞추기 위함.\n var startAngleToRadian = (startAngle - 90) * RADIAN * Math.PI\n var endAngleToRadian = (endAngle - 90) * RADIAN * Math.PI\n\n //// / 바깥쪽 원 그리기 ////\n context.strokeStyle = blankStrokeStyle\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n\n context.lineWidth = lineWidth\n context.stroke()\n\n var percent = Math.min(Math.max(this.animValue / 100, 0), 100)\n\n context.beginPath()\n if (packmanStyle) {\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n context.lineTo(cx, cy)\n } else {\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n }\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n //// 채워지는 원 그리기 ////\n\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n get nature() {\n return NATURE\n }\n}\n"]}
|