simplify createIcon

pull/510/head
WittBulter 7 years ago
parent 03a698cb35
commit 668a2fe423

File diff suppressed because one or more lines are too long

@ -16750,11 +16750,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
*/
var createIcon = function createIcon() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var enableTooltips = arguments[1];
var enableTooltips = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var shortcuts = arguments[2];
var el = document.createElement("a");
enableTooltips = enableTooltips == undefined ? true : enableTooltips;
if (options.title && enableTooltips) {
el.title = createTootlip(options.title, options.action, shortcuts);

File diff suppressed because one or more lines are too long

@ -27,9 +27,8 @@ import {
/**
* Create icon element for toolbar.
*/
const createIcon = (options = {}, enableTooltips, shortcuts) => {
const createIcon = (options = {}, enableTooltips = true, shortcuts) => {
let el = document.createElement("a");
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
if(options.title && enableTooltips) {
el.title = createTootlip(options.title, options.action, shortcuts);

Loading…
Cancel
Save