Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.addState(newMode);
this.currentMode = newMode;
}
function updateAdvancedColorPicker() {
// 更新色盘
var colorPicker = this.getChild('advanced');
if (colorPicker) {
var color = this.displayHex;
colorPicker.updateHex(color);
var alpha = this.displayAlpha;
colorPicker.updateAlpha(alpha);
}
}
esui.register(FullColorPicker);
return FullColorPicker;
}
);
function search(e) {
this.search();
}
function resetSearchState(control) {
// 删除搜索状态
control.removeState('queried');
// 清空搜索框
var searchBox = control.getSearchBox();
if (searchBox) {
searchBox.set('text', '');
}
}
esui.register(RichSelector);
return RichSelector;
}
);
}
// PIE左边距极限值。小于这个的话,就和地图重叠了。
var LEFT_EXTREME_POSITION = 640;
// 容器宽度界定值。容器比这个大的话,可以放得更宽松。
var WINDOW_WIDTH = 1200;
function getPieLeftPosition(mainWidth) {
var pieLeftPosition = mainWidth - (mainWidth > WINDOW_WIDTH ? 400 : 220);
if (pieLeftPosition < LEFT_EXTREME_POSITION) {
pieLeftPosition = LEFT_EXTREME_POSITION;
}
return pieLeftPosition;
}
require('esui').register(RegionChart);
return RegionChart;
}
);
// 存住活动的对象
this.activeCursorElement = cursorElement;
// 增加active的样式
$(cursorElement).addClass(this.helper.getPartClassName('body-cursor-active'));
// 点击的时候再初始化各种坐标 为了一些初始化时不在屏幕内的控件
initBodyElements(this);
// 滑块首先移动到鼠标点击位置
mousemoveHandler.call(this, e);
return true;
}
esui.register(Slider);
return Slider;
}
);
if (!this.rawValue) {
// 第一次没有设置的时候设置一个空值进来
this.rawValue = [];
}
var rawValue = this.rawValue.slice(0);
rawValue.push(inputValue);
this.setProperties({rawValue: rawValue});
if (beforeValue === this.getValue() && inputValue.length) {
return;
}
// token创建成功,清空输入框
input.setRawValue('');
}
esui.register(TokenField);
return TokenField;
}
);
}
var helper = this.helper;
var toolTpl = '<span data-tool-role="${iconRole}" class="${iconClass}" data-role="tool"></span>';
u.each(toolRole.split(','), function (role) {
$(helper.getPart('tool')).append(lib.format(
toolTpl,
{
iconClass: helper.getIconClass() + '-' + role,
iconRole: role
}
));
});
}
esui.register(MediaPreview);
return MediaPreview;
});
else {
this.clearQuery();
}
},
/**
* 获取筛选区Panel
* @return {esui.Panel}
*/
getFilter: function () {
return this.getChild('body').getChild('searchBoxArea').getChild('filter');
}
}
);
esui.register(TableRichSelectorWithFilter);
return TableRichSelectorWithFilter;
}
);
}
}
/**
* 添加数据时才控制展开收起
*
* @event
* @param {Object} e 事件对象
*/
function addHandler(e) {
if (this.collapseAfterChange) {
this.toggleContent();
}
}
esui.register(ToggleSelector);
return ToggleSelector;
}
);
/**
* 销毁控件
*
* @protected
* @override
*/
exports.dispose = function () {
this.$super(arguments);
this.nodeIndex = null;
this.selectedNodes = null;
this.selectedNodeIndex = null;
};
var Tree = require('eoo').create(Control, exports);
require('esui').register(Tree);
return Tree;
}
);
else {
this.clearQuery();
}
};
/**
* 获取筛选区Panel
* @return {esui.Panel}
*/
exports.getFilter = function () {
return this.getChild('body').getChild('filter');
};
var TableRichSelectorWithFilter = require('eoo').create(TableRichSelector, exports);
require('esui').register(TableRichSelectorWithFilter);
return TableRichSelectorWithFilter;
}
);