1 | import {
|
---|
2 | require_Factory,
|
---|
3 | require_Shape,
|
---|
4 | require_Util,
|
---|
5 | require_Validators
|
---|
6 | } from "./chunk-HC2KSO22.js";
|
---|
7 | import {
|
---|
8 | require_Global
|
---|
9 | } from "./chunk-M3JPOOL7.js";
|
---|
10 | import {
|
---|
11 | __commonJS
|
---|
12 | } from "./chunk-V4OQ3NZ2.js";
|
---|
13 |
|
---|
14 | // node_modules/konva/lib/shapes/Rect.js
|
---|
15 | var require_Rect = __commonJS({
|
---|
16 | "node_modules/konva/lib/shapes/Rect.js"(exports) {
|
---|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
18 | exports.Rect = void 0;
|
---|
19 | var Factory_1 = require_Factory();
|
---|
20 | var Shape_1 = require_Shape();
|
---|
21 | var Global_1 = require_Global();
|
---|
22 | var Util_1 = require_Util();
|
---|
23 | var Validators_1 = require_Validators();
|
---|
24 | var Rect = class extends Shape_1.Shape {
|
---|
25 | _sceneFunc(context) {
|
---|
26 | var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();
|
---|
27 | context.beginPath();
|
---|
28 | if (!cornerRadius) {
|
---|
29 | context.rect(0, 0, width, height);
|
---|
30 | } else {
|
---|
31 | Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius);
|
---|
32 | }
|
---|
33 | context.closePath();
|
---|
34 | context.fillStrokeShape(this);
|
---|
35 | }
|
---|
36 | };
|
---|
37 | exports.Rect = Rect;
|
---|
38 | Rect.prototype.className = "Rect";
|
---|
39 | (0, Global_1._registerNode)(Rect);
|
---|
40 | Factory_1.Factory.addGetterSetter(Rect, "cornerRadius", 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));
|
---|
41 | }
|
---|
42 | });
|
---|
43 |
|
---|
44 | export {
|
---|
45 | require_Rect
|
---|
46 | };
|
---|
47 | //# sourceMappingURL=chunk-6JNWGPFD.js.map
|
---|