Fix gradient (#1033)
* fix: color picker popup duplicate Signed-off-by: sinjed <oooguuh@gmail.com> * removed console log Signed-off-by: sinjed <oooguuh@gmail.com> * lint Signed-off-by: sinjed <oooguuh@gmail.com> --------- Signed-off-by: sinjed <oooguuh@gmail.com>
This commit is contained in:
@@ -1327,6 +1327,14 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc
|
|||||||
const all = color.active.val('all')
|
const all = color.active.val('all')
|
||||||
if (win.alphaPrecision < 0) win.alphaPrecision = 0
|
if (win.alphaPrecision < 0) win.alphaPrecision = 0
|
||||||
else if (win.alphaPrecision > 2) win.alphaPrecision = 2
|
else if (win.alphaPrecision > 2) win.alphaPrecision = 2
|
||||||
|
|
||||||
|
// Check if table with id 'fill_color' OR 'stroke_color' already exists, then remove it to avoid duplicate
|
||||||
|
const tableIds = ['fill_color', 'stroke_color']
|
||||||
|
tableIds.forEach((id) => {
|
||||||
|
const currTable = document.querySelector('se-colorpicker#' + id).shadowRoot.querySelector('table')
|
||||||
|
if (currTable) { currTable.remove() }
|
||||||
|
})
|
||||||
|
|
||||||
const controlHtml = `<table class="jPicker" id="jPicker-table" cellpadding="0" cellspacing="0">
|
const controlHtml = `<table class="jPicker" id="jPicker-table" cellpadding="0" cellspacing="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
${win.expandable ? '<tr><td class="Move" colspan="5"> </td></tr>' : ''}
|
${win.expandable ? '<tr><td class="Move" colspan="5"> </td></tr>' : ''}
|
||||||
|
|||||||
Reference in New Issue
Block a user