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/Factory.js

    rd565449 r0c6b92a  
    44const Util_1 = require("./Util");
    55const Validators_1 = require("./Validators");
    6 var GET = 'get', SET = 'set';
     6const GET = 'get', SET = 'set';
    77exports.Factory = {
    88    addGetterSetter(constructor, attr, def, validator, after) {
     
    1212    },
    1313    addGetter(constructor, attr, def) {
    14         var method = GET + Util_1.Util._capitalize(attr);
     14        const method = GET + Util_1.Util._capitalize(attr);
    1515        constructor.prototype[method] =
    1616            constructor.prototype[method] ||
    1717                function () {
    18                     var val = this.attrs[attr];
     18                    const val = this.attrs[attr];
    1919                    return val === undefined ? def : val;
    2020                };
    2121    },
    2222    addSetter(constructor, attr, validator, after) {
    23         var method = SET + Util_1.Util._capitalize(attr);
     23        const method = SET + Util_1.Util._capitalize(attr);
    2424        if (!constructor.prototype[method]) {
    2525            exports.Factory.overWriteSetter(constructor, attr, validator, after);
     
    2727    },
    2828    overWriteSetter(constructor, attr, validator, after) {
    29         var method = SET + Util_1.Util._capitalize(attr);
     29        const method = SET + Util_1.Util._capitalize(attr);
    3030        constructor.prototype[method] = function (val) {
    3131            if (validator && val !== undefined && val !== null) {
     
    4040    },
    4141    addComponentsGetterSetter(constructor, attr, components, validator, after) {
    42         var len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;
     42        let len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;
    4343        constructor.prototype[getter] = function () {
    44             var ret = {};
     44            const ret = {};
    4545            for (n = 0; n < len; n++) {
    4646                component = components[n];
     
    4949            return ret;
    5050        };
    51         var basicValidator = (0, Validators_1.getComponentValidator)(components);
     51        const basicValidator = (0, Validators_1.getComponentValidator)(components);
    5252        constructor.prototype[setter] = function (val) {
    53             var oldVal = this.attrs[attr], key;
     53            let oldVal = this.attrs[attr], key;
    5454            if (validator) {
    5555                val = validator.call(this, val);
     
    7878    },
    7979    addOverloadedGetterSetter(constructor, attr) {
    80         var capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;
     80        const capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;
    8181        constructor.prototype[attr] = function () {
    8282            if (arguments.length) {
     
    8989    addDeprecatedGetterSetter(constructor, attr, def, validator) {
    9090        Util_1.Util.error('Adding deprecated ' + attr);
    91         var method = GET + Util_1.Util._capitalize(attr);
    92         var message = attr +
     91        const method = GET + Util_1.Util._capitalize(attr);
     92        const message = attr +
    9393            ' property is deprecated and will be removed soon. Look at Konva change log for more information.';
    9494        constructor.prototype[method] = function () {
    9595            Util_1.Util.error(message);
    96             var val = this.attrs[attr];
     96            const val = this.attrs[attr];
    9797            return val === undefined ? def : val;
    9898        };
     
    104104    backCompat(constructor, methods) {
    105105        Util_1.Util.each(methods, function (oldMethodName, newMethodName) {
    106             var method = constructor.prototype[newMethodName];
    107             var oldGetter = GET + Util_1.Util._capitalize(oldMethodName);
    108             var oldSetter = SET + Util_1.Util._capitalize(oldMethodName);
     106            const method = constructor.prototype[newMethodName];
     107            const oldGetter = GET + Util_1.Util._capitalize(oldMethodName);
     108            const oldSetter = SET + Util_1.Util._capitalize(oldMethodName);
    109109            function deprecated() {
    110110                method.apply(this, arguments);
Note: See TracChangeset for help on using the changeset viewer.