How to use the screenfull.raw 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 dgraph-io / ratel / client / src / components / FrameLayout.js View on Github external
componentDidMount() {
        // Sync fullscreen exit in case exited by ESC.
        // IDEA: This is not efficient as there will be as many event listeners as
        // there are frames.
        document.addEventListener(
            screenfull.raw.fullscreenchange,
            this.syncFullscreenExit,
        );
    }
github dgraph-io / ratel / client / src / components / FrameLayout.js View on Github external
componentDidMount() {
        // Sync fullscreen exit in case exited by ESC.
        // IDEA: This is not efficient as there will be as many event listeners as
        // there are frames.
        document.addEventListener(
            screenfull.raw.fullscreenchange,
            this.syncFullscreenExit,
        );
    }
github dgraph-io / ratel / client / src / components / FrameItem.js View on Github external
React.useEffect(() => {
        const callback = () => setFullscreen(screenfull.isFullscreen);
        document.addEventListener(screenfull.raw.fullscreenchange, callback);

        return () =>
            document.removeEventListener(
                screenfull.raw.fullscreenchange,
                callback,
            );
    });
github googlearchive / webvr-ui / src / Enter360Button.js View on Github external
remove(){
        this.domElement.removeEventListener('click', this.__onClick);
        document.removeEventListener(screenfull.raw.fullscreenchanged, this.__onChangeFullscreen);
        super.remove();
    }
github JonasDoebertin / kirby-visual-markdown / src / js / field / field.js View on Github external
/*
         Set up change event handler
         */
        this.codemirror.on('change', this.updateStorage.bind(this));

        /*
         Set up focus and blur event handlers
         */
        this.codemirror.on('focus', this.attachFocusStyles.bind(this));
        this.codemirror.on('blur', this.detachFocusStyles.bind(this));

        /*
         Set up fullscreen mode change event handler
         */
        $(document).bind(Screenfull.raw.fullscreenchange, this.changeFullscreenModeHandler.bind(this));

        /**
         * Make the editor field accept Kirby typical
         * file/page drag and drop events.
         *
         * @since 1.0.0
         */
        this.$wrapper.droppable({
            hoverClass: 'markdownfield-wrapper-over',
            accept: this.$draggable,
            drop: function (event, element) {
                this.editor.insert(element.draggable.data('text'));
            }
        });

        /**
github dgraph-io / ratel / client / src / components / FrameItem.js View on Github external
return () =>
            document.removeEventListener(
                screenfull.raw.fullscreenchange,
                callback,
            );
    });
github SubmarineInteractive / Lux-Operon / src / components / ToolBar / index.js View on Github external
addEventListeners() {

    Emitter.on( EXP_TOGGLE_PAUSE_GAME, this.onTogglePauseGame );
    Emitter.on( TOOLBAR_TOGGLE, this.onToolbarToggle );
    Emitter.on( TOOLBAR_HIDE_PLAY, this.onToolbarHidePlay );

    document.addEventListener(screenfull.raw.fullscreenchange, this.onFullscreenChange);
  }
github Hypercubed / Project-Chi / dataset / example / app / components / examples / sunburst / sunburst.js View on Github external
function controller ($log, $timeout, $element) {
  const $ctrl = this;
  const chart = new SunburstChart();

  if (screenfull.enabled) {
    document.addEventListener(screenfull.raw.fullscreenchange, event => {
      $log.debug('screenfull.raw.fullscreenerror');
      angular.element(event.target).toggleClass('fullscreen', screenfull.isFullscreen);
      draw();
    });
  }

  return Object.assign($ctrl, {
    editorOptions: {
      data: $ctrl.dataPackage,
      enableSvgDownload: true,
      enablePngDownload: false,
      onChange: draw
    },
    draw,
    $onInit () {
      $timeout(draw, 0);
github Wikia / app / extensions / wikia / ArticleVideo / bower_components / html5-skin / js / controller.js View on Github external
enableFullScreen: function() {
      if (Fullscreen.enabled) {
        this.state.isFullScreenSupported = true;
        document.addEventListener(Fullscreen.raw.fullscreenchange, this.onFullscreenChanged.bind(this));
      }
    },
github jplayer / react-jPlayer / src / components / jPlayer / screenFull / screenFullContainer.jsx View on Github external
componentDidMount() {
    if (screenfull.enabled) {
      document.addEventListener(screenfull.raw.fullscreenchange,
        this.props.closeFullScreenListener);
    }
    this.requestFullScreen();
  },
  componentDidUpdate(prevProps) {