mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-06-01 21:42:28 +02:00
simplify createIcon
This commit is contained in:
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);
|
||||
|
|
2
dist/simplemde.min.js
vendored
2
dist/simplemde.min.js
vendored
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…
Reference in a new issue