Refactoring

This commit is contained in:
Julia Radzhabova 2021-10-05 12:25:58 +03:00
parent 5f4345679d
commit 68ad058a65
6 changed files with 6 additions and 6 deletions

View file

@ -378,6 +378,7 @@ define([
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
resetPageX(e); resetPageX(e);
me.mouseFree = true;
var index = e.data.index, var index = e.data.index,
lastValue = me.thumbs[index].value, lastValue = me.thumbs[index].value,
@ -405,7 +406,6 @@ define([
$(document).off('mouseup', me.binding.onMouseUp); $(document).off('mouseup', me.binding.onMouseUp);
$(document).off('mousemove', me.binding.onMouseMove); $(document).off('mousemove', me.binding.onMouseMove);
me.mouseFree = true;
me._dragstart = undefined; me._dragstart = undefined;
!me.isRemoveThumb && me.trigger('changecomplete', me, value, lastValue); !me.isRemoveThumb && me.trigger('changecomplete', me, value, lastValue);
me.isRemoveThumb = undefined; me.isRemoveThumb = undefined;

View file

@ -994,7 +994,7 @@ define([
} }
else else
me.mnuDirectionPicker.dataViewItems.forEach(function (item){ me.mnuDirectionPicker.dataViewItems.forEach(function (item){
var type = item.options.model.attributes.type+90; var type = item.model.get('type')+90;
item.$el.children(0).css({'background': 'linear-gradient('+ type + 'deg, '+ me.gradientColorsStr + ')'}); item.$el.children(0).css({'background': 'linear-gradient('+ type + 'deg, '+ me.gradientColorsStr + ')'});
}); });

View file

@ -539,7 +539,7 @@ define([
this.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + gradientColorsStr + ')'}); this.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + gradientColorsStr + ')'});
else else
this.mnuDirectionPicker.dataViewItems.forEach(function (item) { this.mnuDirectionPicker.dataViewItems.forEach(function (item) {
var type = item.options.model.attributes.type + 90; var type = item.model.get('type') + 90;
item.$el.children(0).css({'background': 'linear-gradient(' + type + 'deg, ' + gradientColorsStr + ')'}); item.$el.children(0).css({'background': 'linear-gradient(' + type + 'deg, ' + gradientColorsStr + ')'});
}); });

View file

@ -615,7 +615,7 @@ define([
this.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + gradientColorsStr + ')'}); this.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + gradientColorsStr + ')'});
else else
this.mnuDirectionPicker.dataViewItems.forEach(function (item) { this.mnuDirectionPicker.dataViewItems.forEach(function (item) {
var type = item.options.model.attributes.type + 90; var type = item.model.get('type') + 90;
item.$el.children(0).css({'background': 'linear-gradient(' + type + 'deg, ' + gradientColorsStr + ')'}); item.$el.children(0).css({'background': 'linear-gradient(' + type + 'deg, ' + gradientColorsStr + ')'});
}); });

View file

@ -950,7 +950,7 @@ define([
me.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + me.gradientColorsStr + ')'}); me.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + me.gradientColorsStr + ')'});
else else
me.mnuDirectionPicker.dataViewItems.forEach(function (item){ me.mnuDirectionPicker.dataViewItems.forEach(function (item){
var type = item.options.model.attributes.type+90; var type = item.model.get('type')+90;
item.$el.children(0).css({'background': 'linear-gradient('+ type + 'deg, '+ me.gradientColorsStr + ')'}); item.$el.children(0).css({'background': 'linear-gradient('+ type + 'deg, '+ me.gradientColorsStr + ')'});
}); });

View file

@ -929,7 +929,7 @@ define([
me.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + me.gradientColorsStr + ')'}); me.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + me.gradientColorsStr + ')'});
else else
me.mnuDirectionPicker.dataViewItems.forEach(function (item){ me.mnuDirectionPicker.dataViewItems.forEach(function (item){
var type = item.options.model.attributes.type+90; var type = item.model.get('type')+90;
item.$el.children(0).css({'background': 'linear-gradient('+ type + 'deg, '+ me.gradientColorsStr + ')'}); item.$el.children(0).css({'background': 'linear-gradient('+ type + 'deg, '+ me.gradientColorsStr + ')'});
}); });