Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/konva/lib/Layer.js

    rd565449 r0c6b92a  
    1010const Shape_1 = require("./Shape");
    1111const Global_1 = require("./Global");
    12 var HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [
     12const HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [
    1313    { x: 0, y: 0 },
    1414    { x: -1, y: -1 },
     
    5353    setZIndex(index) {
    5454        super.setZIndex(index);
    55         var stage = this.getStage();
     55        const stage = this.getStage();
    5656        if (stage && stage.content) {
    5757            stage.content.removeChild(this.getNativeCanvasElement());
     
    6767    moveToTop() {
    6868        Node_1.Node.prototype.moveToTop.call(this);
    69         var stage = this.getStage();
     69        const stage = this.getStage();
    7070        if (stage && stage.content) {
    7171            stage.content.removeChild(this.getNativeCanvasElement());
     
    7575    }
    7676    moveUp() {
    77         var moved = Node_1.Node.prototype.moveUp.call(this);
     77        const moved = Node_1.Node.prototype.moveUp.call(this);
    7878        if (!moved) {
    7979            return false;
    8080        }
    81         var stage = this.getStage();
     81        const stage = this.getStage();
    8282        if (!stage || !stage.content) {
    8383            return false;
     
    9494    moveDown() {
    9595        if (Node_1.Node.prototype.moveDown.call(this)) {
    96             var stage = this.getStage();
     96            const stage = this.getStage();
    9797            if (stage) {
    98                 var children = stage.children;
     98                const children = stage.children;
    9999                if (stage.content) {
    100100                    stage.content.removeChild(this.getNativeCanvasElement());
     
    108108    moveToBottom() {
    109109        if (Node_1.Node.prototype.moveToBottom.call(this)) {
    110             var stage = this.getStage();
     110            const stage = this.getStage();
    111111            if (stage) {
    112                 var children = stage.children;
     112                const children = stage.children;
    113113                if (stage.content) {
    114114                    stage.content.removeChild(this.getNativeCanvasElement());
     
    124124    }
    125125    remove() {
    126         var _canvas = this.getNativeCanvasElement();
     126        const _canvas = this.getNativeCanvasElement();
    127127        Node_1.Node.prototype.remove.call(this);
    128128        if (_canvas && _canvas.parentNode && Util_1.Util._isInDocument(_canvas)) {
     
    141141    }
    142142    _validateAdd(child) {
    143         var type = child.getType();
     143        const type = child.getType();
    144144        if (type !== 'Group' && type !== 'Shape') {
    145145            Util_1.Util.throw('You may only add groups and shapes to a layer.');
     
    197197            return null;
    198198        }
    199         var spiralSearchDistance = 1;
    200         var continueSearch = false;
     199        let spiralSearchDistance = 1;
     200        let continueSearch = false;
    201201        while (true) {
    202202            for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {
     
    247247    }
    248248    drawScene(can, top) {
    249         var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());
     249        const layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());
    250250        this._fire(BEFORE_DRAW, {
    251251            node: this,
     
    261261    }
    262262    drawHit(can, top) {
    263         var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);
     263        const layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);
    264264        if (layer && layer.clearBeforeDraw()) {
    265265            layer.getHitCanvas().getContext().clear();
     
    288288            return;
    289289        }
    290         var parent = this.parent;
    291         var added = !!this.hitCanvas._canvas.parentNode;
     290        const parent = this.parent;
     291        const added = !!this.hitCanvas._canvas.parentNode;
    292292        if (added) {
    293293            parent.content.removeChild(this.hitCanvas._canvas);
Note: See TracChangeset for help on using the changeset viewer.