HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/slfopp7cb1df/public_html/sitepacket.com/src/client/src/UI/artboardMenu.js
import * as icons from 'Client/UI/icons'
import { htmlToElement } from 'Editor/scripts/utilities'

export default class ArtboardMenu {
  element = undefined
  store = undefined

  constructor(store) {
    this.store = store
    this.element = htmlToElement(this.html())
  }
  html() {
    let html = ``

    html += '<div class="imp-ui-layers-menu-wrap" data-element-name="layersSelect">'
    html += icons.arrowDown
    html += '   <select class="imp-ui-element imp-ui-layers-select">'

    for (let artboard of this.store.getArtboards()) {
      html += `<option value="${artboard.id}">${artboard.title}</option>`
    }

    html += '   </select>'
    html += '</div>'

    return html
  }
  selectArtboard(value) {
    this.element.querySelector('select').value = value
  }
}