import Tool from './tool';

export default class ColorPickerTool extends Tool {



  constructor() {
    super('color-picker', 'url("/static/cursor/cursor-color-dropper.png") 0 24, default');
  }

  /**
   * Always in progress
   * Prevent control drag while pan.
   */
  override inProgress(evt ? : Event) {
    return true;
  }


  override onclick(evt : MouseEvent) {
    console.log('ColorPickerTool#onclick()', evt._contentPoint, this.editor);
    if (this.editor && this.editor.pickColor) {
      this.editor.pickColor(evt._canvasPoint, evt._contentPoint);
    }
  }
}
