From be47cfc47189d28c14e739aa4ac2d58978abff9e Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 28 Oct 2020 01:41:38 +0300 Subject: [PATCH] throttle colorview on page load --- vendor-overwrites/colorpicker/colorview.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vendor-overwrites/colorpicker/colorview.js b/vendor-overwrites/colorpicker/colorview.js index 3e57758c..c16c9ea3 100644 --- a/vendor-overwrites/colorpicker/colorview.js +++ b/vendor-overwrites/colorpicker/colorview.js @@ -216,6 +216,10 @@ function colorizeChanges(state, changes) { + if (changes.length === 1 && changes[0].origin === 'setValue') { + colorizeAll(state); + return; + } const queue = []; const postponed = []; const viewFrom = state.cm.display.viewFrom || 0;