How to use the screenfull.element function in screenfull

To help you get started, we’ve selected a few screenfull 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 zuck / alighieri / src / components / Writer.vue View on Github external
}

      // Zen mode
      if (evt.key === 'F11') {
        evt.preventDefault()
        evt.stopPropagation()
        evt.returnValue = false

        if (evt.ctrlKey) {
          if (this.isElectron) {
            const win = this.$electron.remote.getCurrentWindow()
            win.setFullScreen(!win.isFullScreen())
            this.isFullscreen = win.isFullScreen()
          }
          else {
            screenfull.toggle(screenfull.element || document.documentElement)
            this.isFullscreen = screenfull.isFullscreen
          }
        }
      }
    },
    convertMdToHtml (md) {
github JonasDoebertin / kirby-visual-markdown / src / js / field / field.js View on Github external
changeFullscreenModeHandler() {
        // Add indication class if fullscreen mode was entered
        if (Screenfull.isFullscreen && (Screenfull.element === this.$wrapper.get(0))) {
            this.attachFullscreenStyles();
        }

        // Remove indicator class if fullscreen mode was exited
        if (!Screenfull.isFullscreen) {
            this.detachFullscreenStyles();
        }
    }
github geosolutions-it / MapStore2 / web / client / epics / fullscreen.js View on Github external
                .filter(() => screenfull.element !== element)
                .map( () => setControlProperty("fullscreen", "enabled", false) ),
github goblin-laboratory / reactjs-player / src / lib / index.js View on Github external
onFullscreenChange = () => {
    if (!this.containerRef || !this.containerRef.current) {
      return;
    }
    this.setStateSafely({ fullScreen: !!screenfull.element && this.containerRef.current === screenfull.element });
  };
github jeroencoumans / react-fullscreen-component / index.js View on Github external
onChangeFullscreen: function (e) {
    var isFullscreen = screenfull.isFullscreen;
    this.setState({
      isFullscreen: isFullscreen,
      fullScreenElement: screenfull.element
    });

    if (isFullscreen) {
      typeof this.onEnterFullscreen === 'function' && this.onEnterFullscreen(e);
    } else {
      typeof this.onExitFullscreen === 'function' && this.onExitFullscreen(e);
    }
  }
};