Closed huyinghuan closed 8 years ago
Hi @huyinghuan,
there is a lot going on when the colorPicker is initialized and therefore renderCallback()
gets called multiple times. There is the initialization, the alpha-background gets set, the size of the colorPicker, the memory patches and then the backgroundColor gets saved. All actions that happen on init.
Why would you want to prevent the repaint? The behavior is correct.
Can you tell me why this bothers you?
Maybe you need to do things inside the actionCallback()
. if (action === 'init')
will only happen once... Is that what you're looking for?
i console.log in
renderCallBack
it will repeate output when click one time in color picker area.for prevent repeart call
renderCallback
. I write a bad code:Is there any good way to solve it?