#101 lint changes

master
Agriya Dev5 2021-05-21 19:06:24 +05:30
parent 143192d7e3
commit da10092989
6 changed files with 31 additions and 23 deletions

View File

@ -147,8 +147,8 @@ export class SeCMenuDialog extends HTMLElement {
/** /**
* @function init * @function init
* @param {any} name * @param {any} name
* @returns {void} * @returns {void}
*/ */
init (i18next) { init (i18next) {
this.setAttribute('tools-cut', i18next.t('tools.cut')); this.setAttribute('tools-cut', i18next.t('tools.cut'));
this.setAttribute('tools-copy', i18next.t('tools.copy')); this.setAttribute('tools-copy', i18next.t('tools.copy'));
@ -167,7 +167,10 @@ export class SeCMenuDialog extends HTMLElement {
* @returns {any} observed * @returns {any} observed
*/ */
static get observedAttributes () { static get observedAttributes () {
return [ 'disableallmenu', 'enablemenuitems', 'disablemenuitems', 'tools-cut', 'tools-copy', 'tools-paste', 'tools-paste_in_place', 'tools-delete', 'tools-group', 'tools-ungroup', 'tools-move_front', 'tools-move_up', 'tools-move_down', 'tools-move_back' ]; return [ 'disableallmenu', 'enablemenuitems', 'disablemenuitems', 'tools-cut',
'tools-copy', 'tools-paste', 'tools-paste_in_place', 'tools-delete', 'tools-group',
'tools-ungroup', 'tools-move_front', 'tools-move_up', 'tools-move_down',
'tools-move_back' ];
} }
/** /**
* @function attributeChangedCallback * @function attributeChangedCallback

View File

@ -95,14 +95,14 @@ export class SeCMenuLayerDialog extends HTMLElement {
/** /**
* @function init * @function init
* @param {any} name * @param {any} name
* @returns {void} * @returns {void}
*/ */
init (i18next) { init (i18next) {
this.setAttribute('layers-dupe', i18next.t('layers.dupe')); this.setAttribute('layers-dupe', i18next.t('layers.dupe'));
this.setAttribute('layers-del', i18next.t('layers.del')); this.setAttribute('layers-del', i18next.t('layers.del'));
this.setAttribute('layers-merge_down', i18next.t('layers.merge_down')); this.setAttribute('layers-merge_down', i18next.t('layers.merge_down'));
this.setAttribute('layers-merge_all', i18next.t('layers.merge_all')); this.setAttribute('layers-merge_all', i18next.t('layers.merge_all'));
} }
/** /**
* @function observedAttributes * @function observedAttributes
* @returns {any} observed * @returns {any} observed

View File

@ -265,8 +265,8 @@ export class SeEditPrefsDialog extends HTMLElement {
/** /**
* @function init * @function init
* @param {any} name * @param {any} name
* @returns {void} * @returns {void}
*/ */
init (i18next) { init (i18next) {
this.setAttribute('common-ok', i18next.t('common.ok')); this.setAttribute('common-ok', i18next.t('common.ok'));
this.setAttribute('common-cancel', i18next.t('common.cancel')); this.setAttribute('common-cancel', i18next.t('common.cancel'));
@ -287,7 +287,7 @@ export class SeEditPrefsDialog extends HTMLElement {
this.setAttribute('config-units_and_rulers', i18next.t('config.units_and_rulers')); this.setAttribute('config-units_and_rulers', i18next.t('config.units_and_rulers'));
this.setAttribute('config-show_rulers', i18next.t('config.show_rulers')); this.setAttribute('config-show_rulers', i18next.t('config.show_rulers'));
this.setAttribute('config-base_unit', i18next.t('config.base_unit')); this.setAttribute('config-base_unit', i18next.t('config.base_unit'));
} }
/** /**
* @function observedAttributes * @function observedAttributes
* @returns {any} observed * @returns {any} observed

View File

@ -99,14 +99,14 @@ export class SeExportDialog extends HTMLElement {
/** /**
* @function init * @function init
* @param {any} name * @param {any} name
* @returns {void} * @returns {void}
*/ */
init (i18next) { init (i18next) {
this.setAttribute('common-ok', i18next.t('common.ok')); this.setAttribute('common-ok', i18next.t('common.ok'));
this.setAttribute('common-cancel', i18next.t('common.cancel')); this.setAttribute('common-cancel', i18next.t('common.cancel'));
this.setAttribute('ui-quality', i18next.t('ui.quality')); this.setAttribute('ui-quality', i18next.t('ui.quality'));
this.setAttribute('ui-export_type_label', i18next.t('ui.export_type_label')); this.setAttribute('ui-export_type_label', i18next.t('ui.export_type_label'));
} }
/** /**
* @function observedAttributes * @function observedAttributes
* @returns {any} observed * @returns {any} observed
@ -145,7 +145,7 @@ export class SeExportDialog extends HTMLElement {
case 'ui-export_type_label': case 'ui-export_type_label':
node = this._shadowRoot.querySelector('#export_select'); node = this._shadowRoot.querySelector('#export_select');
node.textContent = newValue; node.textContent = newValue;
break; break;
default: default:
// super.attributeChangedCallback(name, oldValue, newValue); // super.attributeChangedCallback(name, oldValue, newValue);
break; break;

View File

@ -143,8 +143,8 @@ export class SeImgPropDialog extends HTMLElement {
/** /**
* @function init * @function init
* @param {any} name * @param {any} name
* @returns {void} * @returns {void}
*/ */
init (i18next) { init (i18next) {
this.setAttribute('common-ok', i18next.t('common.ok')); this.setAttribute('common-ok', i18next.t('common.ok'));
this.setAttribute('common-cancel', i18next.t('common.cancel')); this.setAttribute('common-cancel', i18next.t('common.cancel'));
@ -165,7 +165,11 @@ export class SeImgPropDialog extends HTMLElement {
* @returns {any} observed * @returns {any} observed
*/ */
static get observedAttributes () { static get observedAttributes () {
return [ 'title', 'width', 'height', 'save', 'dialog', 'embed', 'common-ok', 'common-cancel', 'config-image_props', 'config-doc_title', 'config-doc_dims', 'common-width', 'common-height', 'config-select_predefined', 'tools-fit-to-content', 'config-included_images', 'config-image_opt_embed', 'config-image_opt_ref' ]; return [ 'title', 'width', 'height', 'save', 'dialog', 'embed', 'common-ok',
'common-cancel', 'config-image_props', 'config-doc_title', 'config-doc_dims',
'common-width', 'common-height', 'config-select_predefined',
'tools-fit-to-content', 'config-included_images', 'config-image_opt_embed',
'config-image_opt_ref' ];
} }
/** /**
* @function attributeChangedCallback * @function attributeChangedCallback
@ -243,7 +247,7 @@ export class SeImgPropDialog extends HTMLElement {
node = this._shadowRoot.querySelector('#svginfo_title'); node = this._shadowRoot.querySelector('#svginfo_title');
node.textContent = newValue; node.textContent = newValue;
break; break;
case 'config-doc_dims': case 'config-doc_dims':
node = this._shadowRoot.querySelector('#svginfo_dim'); node = this._shadowRoot.querySelector('#svginfo_dim');
node.textContent = newValue; node.textContent = newValue;
break; break;
@ -251,7 +255,7 @@ export class SeImgPropDialog extends HTMLElement {
node = this._shadowRoot.querySelector('#svginfo_width'); node = this._shadowRoot.querySelector('#svginfo_width');
node.textContent = newValue; node.textContent = newValue;
break; break;
case 'common-height': case 'common-height':
node = this._shadowRoot.querySelector('#svginfo_height'); node = this._shadowRoot.querySelector('#svginfo_height');
node.textContent = newValue; node.textContent = newValue;
break; break;

View File

@ -97,14 +97,14 @@ export class SeSvgSourceEditorDialog extends HTMLElement {
/** /**
* @function init * @function init
* @param {any} name * @param {any} name
* @returns {void} * @returns {void}
*/ */
init (i18next) { init (i18next) {
this.setAttribute('tools-source_save', i18next.t('tools.source_save')); this.setAttribute('tools-source_save', i18next.t('tools.source_save'));
this.setAttribute('common-cancel', i18next.t('common.cancel')); this.setAttribute('common-cancel', i18next.t('common.cancel'));
this.setAttribute('notification-source_dialog_note', i18next.t('notification.source_dialog_note')); this.setAttribute('notification-source_dialog_note', i18next.t('notification.source_dialog_note'));
this.setAttribute('config-done', i18next.t('config.done')); this.setAttribute('config-done', i18next.t('config.done'));
} }
/** /**
* @function observedAttributes * @function observedAttributes
* @returns {any} observed * @returns {any} observed
@ -121,6 +121,7 @@ export class SeSvgSourceEditorDialog extends HTMLElement {
*/ */
attributeChangedCallback (name, oldValue, newValue) { attributeChangedCallback (name, oldValue, newValue) {
if (oldValue === newValue) return; if (oldValue === newValue) return;
let node;
switch (name) { switch (name) {
case 'dialog': case 'dialog':
if (newValue === 'open') { if (newValue === 'open') {
@ -155,12 +156,12 @@ export class SeSvgSourceEditorDialog extends HTMLElement {
this.$cancelBtn.textContent = newValue; this.$cancelBtn.textContent = newValue;
break; break;
case 'notification-source_dialog_note': case 'notification-source_dialog_note':
const node = this._shadowRoot.querySelector('#copy_save_note'); node = this._shadowRoot.querySelector('#copy_save_note');
node.textContent = newValue; node.textContent = newValue;
break; break;
case 'config-done': case 'config-done':
this.$copyBtn.textContent = newValue; this.$copyBtn.textContent = newValue;
break; break;
default: default:
super.attributeChangedCallback(name, oldValue, newValue); super.attributeChangedCallback(name, oldValue, newValue);
break; break;