How to use the @material/linear-progress.MDCLinearProgress.attachTo function in @material/linear-progress

To help you get started, we’ve selected a few @material/linear-progress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grow / grow / grow / ui / js / editor / editor.js View on Github external
this._isEditingSource = false

    this.autosaveEl.addEventListener('click', this.handleAutosaveClick.bind(this))
    this.saveEl.addEventListener('click', () => { this.save(true) })
    this.podPathEl.addEventListener('change', () => { this.load(this.podPath) })
    this.podPathEl.addEventListener('keyup', () => { this.delayPodPath() })

    this.mobileToggleMd = MDCIconToggle.attachTo(this.mobileToggleEl)
    this.mobileToggleEl.addEventListener(
      'MDCIconToggle:change', this.handleMobileClick.bind(this))
    this.sourceToggleMd = MDCIconToggle.attachTo(this.sourceToggleEl)
    this.sourceToggleEl.addEventListener(
      'MDCIconToggle:change', this.handleSourceClick.bind(this))
    this.podPathMd = new MDCTextField(
      this.containerEl.querySelector('.content__path .mdc-text-field'))
    this.saveProgressMd = MDCLinearProgress.attachTo(
      this.containerEl.querySelector('.sidebar__save .mdc-linear-progress'))
    this.saveProgressMd.close()

    this.api = new EditorApi({
      host: this.host,
      port: this.port,
    })
    this.partials = new Partials(this.api)

    // Default to loading with the UI.
    this.load(this.podPath)

    // TODO Start the autosave depending on local storage.
    // this.startAutosave()
  }
github matsp / material-components-vue / components / linear-progress / LinearProgress.vue View on Github external
mounted () {
    this.mdcLinearProgress = MDCLinearProgress.attachTo(this.$el)
    this.mdcLinearProgress.determinate = !this.indeterminate
    this.mdcLinearProgress.reverse = this.reverse
    this.mdcLinearProgress.progress = this.progress
    this.mdcLinearProgress.buffer = this.buffer
    this.open ? this.mdcLinearProgress.open() : this.mdcLinearProgress.close()
  },
  beforeDestroy () {