tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

animations.js (1783B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 const {
      8  UPDATE_ANIMATIONS,
      9  UPDATE_DETAIL_VISIBILITY,
     10  UPDATE_ELEMENT_PICKER_ENABLED,
     11  UPDATE_HIGHLIGHTED_NODE,
     12  UPDATE_PLAYBACK_RATES,
     13  UPDATE_SELECTED_ANIMATION,
     14  UPDATE_SIDEBAR_SIZE,
     15 } = require("resource://devtools/client/inspector/animation/actions/index.js");
     16 
     17 module.exports = {
     18  /**
     19   * Update the list of animation in the animation inspector.
     20   */
     21  updateAnimations(animations) {
     22    return {
     23      type: UPDATE_ANIMATIONS,
     24      animations,
     25    };
     26  },
     27 
     28  /**
     29   * Update visibility of detail pane.
     30   */
     31  updateDetailVisibility(detailVisibility) {
     32    return {
     33      type: UPDATE_DETAIL_VISIBILITY,
     34      detailVisibility,
     35    };
     36  },
     37 
     38  /**
     39   * Update the state of element picker in animation inspector.
     40   */
     41  updateElementPickerEnabled(elementPickerEnabled) {
     42    return {
     43      type: UPDATE_ELEMENT_PICKER_ENABLED,
     44      elementPickerEnabled,
     45    };
     46  },
     47 
     48  /**
     49   * Update the highlighted node.
     50   */
     51  updateHighlightedNode(nodeFront) {
     52    return {
     53      type: UPDATE_HIGHLIGHTED_NODE,
     54      highlightedNode: nodeFront ? nodeFront.actorID : null,
     55    };
     56  },
     57 
     58  /**
     59   * Update the playback rates.
     60   */
     61  updatePlaybackRates() {
     62    return {
     63      type: UPDATE_PLAYBACK_RATES,
     64    };
     65  },
     66 
     67  /**
     68   * Update selected animation.
     69   */
     70  updateSelectedAnimation(selectedAnimation) {
     71    return {
     72      type: UPDATE_SELECTED_ANIMATION,
     73      selectedAnimation,
     74    };
     75  },
     76 
     77  /**
     78   * Update the sidebar size.
     79   */
     80  updateSidebarSize(sidebarSize) {
     81    return {
     82      type: UPDATE_SIDEBAR_SIZE,
     83      sidebarSize,
     84    };
     85  },
     86 };