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

Function reflow

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

Source from the content-addressed store, hash-verified

921 }
922
923 function reflow() {
924 if (!visible) {
925 return; // Calculations would be useless and wouldn't be reliable anyways
926 }
927 dragWidth = dragger.width();
928 dragHeight = dragger.height();
929 dragHelperHeight = dragHelper.height();
930 slideWidth = slider.width();
931 slideHeight = slider.height();
932 slideHelperHeight = slideHelper.height();
933 alphaWidth = alphaSlider.width();
934 alphaSlideHelperWidth = alphaSlideHelper.width();
935
936 if (!flat) {
937 container.css('position', 'absolute');
938 if (opts.offset) {
939 container.offset(opts.offset);
940 } else {
941 container.offset(getOffset(container, offsetElement));
942 }
943 }
944
945 updateHelperLocations();
946
947 if (opts.showPalette) {
948 drawPalette();
949 }
950
951 boundElement.trigger('reflow.spectrum');
952 }
953
954 function destroy() {
955 boundElement.show();

Callers 4

applyOptionsFunction · 0.85
dragStartFunction · 0.85
showFunction · 0.85
setOffsetFunction · 0.85

Calls 7

getOffsetFunction · 0.85
updateHelperLocationsFunction · 0.85
drawPaletteFunction · 0.85
widthMethod · 0.80
heightMethod · 0.80
offsetMethod · 0.45
triggerMethod · 0.45

Tested by

no test coverage detected