1 | import {
|
---|
2 | require_Factory,
|
---|
3 | require_Shape,
|
---|
4 | require_Validators
|
---|
5 | } from "./chunk-HC2KSO22.js";
|
---|
6 | import {
|
---|
7 | require_Global
|
---|
8 | } from "./chunk-M3JPOOL7.js";
|
---|
9 | import {
|
---|
10 | __commonJS
|
---|
11 | } from "./chunk-V4OQ3NZ2.js";
|
---|
12 |
|
---|
13 | // node_modules/konva/lib/shapes/Ring.js
|
---|
14 | var require_Ring = __commonJS({
|
---|
15 | "node_modules/konva/lib/shapes/Ring.js"(exports) {
|
---|
16 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
17 | exports.Ring = void 0;
|
---|
18 | var Factory_1 = require_Factory();
|
---|
19 | var Shape_1 = require_Shape();
|
---|
20 | var Validators_1 = require_Validators();
|
---|
21 | var Global_1 = require_Global();
|
---|
22 | var PIx2 = Math.PI * 2;
|
---|
23 | var Ring = class extends Shape_1.Shape {
|
---|
24 | _sceneFunc(context) {
|
---|
25 | context.beginPath();
|
---|
26 | context.arc(0, 0, this.innerRadius(), 0, PIx2, false);
|
---|
27 | context.moveTo(this.outerRadius(), 0);
|
---|
28 | context.arc(0, 0, this.outerRadius(), PIx2, 0, true);
|
---|
29 | context.closePath();
|
---|
30 | context.fillStrokeShape(this);
|
---|
31 | }
|
---|
32 | getWidth() {
|
---|
33 | return this.outerRadius() * 2;
|
---|
34 | }
|
---|
35 | getHeight() {
|
---|
36 | return this.outerRadius() * 2;
|
---|
37 | }
|
---|
38 | setWidth(width) {
|
---|
39 | this.outerRadius(width / 2);
|
---|
40 | }
|
---|
41 | setHeight(height) {
|
---|
42 | this.outerRadius(height / 2);
|
---|
43 | }
|
---|
44 | };
|
---|
45 | exports.Ring = Ring;
|
---|
46 | Ring.prototype.className = "Ring";
|
---|
47 | Ring.prototype._centroid = true;
|
---|
48 | Ring.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"];
|
---|
49 | (0, Global_1._registerNode)(Ring);
|
---|
50 | Factory_1.Factory.addGetterSetter(Ring, "innerRadius", 0, (0, Validators_1.getNumberValidator)());
|
---|
51 | Factory_1.Factory.addGetterSetter(Ring, "outerRadius", 0, (0, Validators_1.getNumberValidator)());
|
---|
52 | }
|
---|
53 | });
|
---|
54 |
|
---|
55 | export {
|
---|
56 | require_Ring
|
---|
57 | };
|
---|
58 | //# sourceMappingURL=chunk-D42GQH4N.js.map
|
---|