Remove jquery from LayersListController.js

This commit is contained in:
Julian Descottes 2018-04-08 16:17:56 +02:00
parent 1c3b359b5c
commit 7b8978da7a

View File

@ -22,7 +22,7 @@
this.updateToggleLayerPreview_(); this.updateToggleLayerPreview_();
$.subscribe(Events.PISKEL_RESET, this.renderLayerList_.bind(this)); $.subscribe(Events.PISKEL_RESET, this.renderLayerList_.bind(this));
$.subscribe(Events.USER_SETTINGS_CHANGED, $.proxy(this.onUserSettingsChange_, this)); $.subscribe(Events.USER_SETTINGS_CHANGED, this.onUserSettingsChange_.bind(this));
}; };
ns.LayersListController.prototype.renderLayerList_ = function () { ns.LayersListController.prototype.renderLayerList_ = function () {
@ -125,10 +125,10 @@
var layerItem = pskl.utils.Template.createFromHTML(layerItemHtml); var layerItem = pskl.utils.Template.createFromHTML(layerItemHtml);
this.layersListEl.insertBefore(layerItem, this.layersListEl.firstChild); this.layersListEl.insertBefore(layerItem, this.layersListEl.firstChild);
if (layerItem.offsetWidth < layerItem.scrollWidth) { if (layerItem.offsetWidth < layerItem.scrollWidth) {
$(layerItem).find('.layer-name') var layerNameEl = layerItem.querySelector('.layer-name');
.addClass('overflowing-name') layerNameEl.classList.add('overflowing-name');
.attr('title', layer.getName()) layerNameEl.setAttribute('title', layer.getName());
.tooltip(); layerNameEl.setAttribute('rel', 'tooltip');
} }
}; };