INNER CODE UNIT · JavaScript

hook

lirantal/dockly · hooks/images.hook.js:5

class hook extends baseHook {
  init () {
    if (!this.widgetsRepo.has('toolbar')) {
      return null
    }

    this.notifyOnImageUpdate()

    const toolbar = this.widgetsRepo.get('toolbar')
    toolbar.on('key', (keyString) => {
      // on refresh keypress, update all containers and images information

      if (keyString === 'r') {
        this.removeImage()
      }

      if (keyString === 'c') {
        this.copyItemIdToClipboard()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…