source: imaps-frontend/node_modules/konva/lib/shapes/Rect.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 961 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Rect = void 0;
4const Factory_1 = require("../Factory");
5const Shape_1 = require("../Shape");
6const Global_1 = require("../Global");
7const Util_1 = require("../Util");
8const Validators_1 = require("../Validators");
9class Rect extends Shape_1.Shape {
10 _sceneFunc(context) {
11 var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();
12 context.beginPath();
13 if (!cornerRadius) {
14 context.rect(0, 0, width, height);
15 }
16 else {
17 Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius);
18 }
19 context.closePath();
20 context.fillStrokeShape(this);
21 }
22}
23exports.Rect = Rect;
24Rect.prototype.className = 'Rect';
25(0, Global_1._registerNode)(Rect);
26Factory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));
Note: See TracBrowser for help on using the repository browser.