MCPcopy
hub / github.com/GrapesJS/grapesjs / hide

Function hide

packages/core/src/utils/ColorPicker.ts:713–729  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

711 }
712
713 function hide() {
714 // Return if hiding is unnecessary
715 if (!visible || flat) {
716 return;
717 }
718 visible = false;
719
720 $(doc).unbind('keydown.spectrum', onkeydown);
721 $(doc).unbind('click.spectrum', clickout);
722 $(window).unbind('resize.spectrum', resize);
723
724 replacer.removeClass('sp-active');
725 container.addClass('sp-hidden');
726
727 callbacks.hide(get());
728 boundElement.trigger('hide.spectrum', [get()]);
729 }
730
731 function revert() {
732 set(colorOnShow, true);

Callers 6

initializeFunction · 0.85
paletteElementClickFunction · 0.85
toggleFunction · 0.85
onkeydownFunction · 0.85
clickoutFunction · 0.85
disableFunction · 0.85

Calls 5

removeClassMethod · 0.80
getFunction · 0.70
addClassMethod · 0.45
hideMethod · 0.45
triggerMethod · 0.45

Tested by

no test coverage detected