當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Css.remove方法代碼示例

本文整理匯總了TypeScript中@ephox/sugar.Css.remove方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Css.remove方法的具體用法?TypeScript Css.remove怎麽用?TypeScript Css.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@ephox/sugar.Css的用法示例。


在下文中一共展示了Css.remove方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: measureHeights

        SelectorFind.descendant(comp.element(), '[role="tabpanel"]').each((tabview) => {
          Css.set(tabview, 'visibility', 'hidden');

          // Determine the maximum heights of each tab
          comp.getSystem().getByDom(tabview).toOption().each((tabviewComp) => {
            const heights = measureHeights(allTabs, tabview, tabviewComp);

            // Calculate the maximum tab height and store it
            const maxTabHeightOpt = getMaxHeight(heights);
            maxTabHeight.set(maxTabHeightOpt);
          });

          // Set an initial height, based on the current size
          updateTabviewHeight(comp.element(), tabview, maxTabHeight);

          // Show the tabs
          Css.remove(tabview, 'visibility');
          showTab(allTabs, comp);

          // Use a delay here and recalculate the height, as we need all the components attached
          // to be able to properly calculate the max height
          Delay.requestAnimationFrame(() => {
            updateTabviewHeight(comp.element(), tabview, maxTabHeight);
          });
        });
開發者ID:tinymce,項目名稱:tinymce,代碼行數:25,代碼來源:DialogTabHeight.ts

示例2:

 AlloyEvents.runOnSource<SugarEvent>(NativeEvents.transitionend(), (comp, se) => {
   InlineView.getContent(comp).each((c) => {
     // Css.remove(c.element(), 'opacity');
   });
   Class.remove(comp.element(), resizingClass);
   Css.remove(comp.element(), 'width');
 }),
開發者ID:tinymce,項目名稱:tinymce,代碼行數:7,代碼來源:ContextUi.ts

示例3: clearTimer

 const launchContext = (toolbarApi: Toolbar.ContextToolbar | Toolbar.ContextForm, elem: Option<DomElement>) => {
   clearTimer();
   const toolbarSpec = buildToolbar(toolbarApi);
   const sElem = elem.map(Element.fromDom);
   const anchor = getAnchor(toolbarApi.position, sElem);
   lastAnchor.set(Option.some((anchor)));
   lastElement.set(elem);
   InlineView.showWithin(contextbar, anchor, wrapInPopDialog(toolbarSpec), getBoxElement());
   Css.remove(contextbar.element(), 'display');
 };
開發者ID:tinymce,項目名稱:tinymce,代碼行數:10,代碼來源:ContextToolbar.ts

示例4: parseInt

        SelectorFind.descendant(comp.element(), '[role="tabpanel"]').each((tabview) => {
          const oldFocus = Focus.active();
          Css.set(tabview, 'visibility', 'hidden');
          const oldHeight = Css.getRaw(tabview, 'height').map((h) => parseInt(h, 10));
          Css.remove(tabview, 'height');
          const newHeight = tabview.dom().getBoundingClientRect().height;
          const hasGrown = oldHeight.forall((h) => newHeight > h);

          if (hasGrown) {
            maxTabHeight.set(Option.from(newHeight));
            updateTabviewHeight(comp.element(), tabview, maxTabHeight);
          } else {
            oldHeight.each((h) => {
              Css.set(tabview, 'height', `${h}px`);
            });
          }

          Css.remove(tabview, 'visibility');
          oldFocus.each(Focus.focus);
        });
開發者ID:tinymce,項目名稱:tinymce,代碼行數:20,代碼來源:DialogTabHeight.ts

示例5: renderSpinner

const toggleThrobber = (comp: AlloyComponent, state: boolean, providerBackstage: UiFactoryBackstageProviders) => {
  const element = comp.element();
  if (state === true) {
    Replacing.set(comp, [ renderSpinner(providerBackstage) ]);
    Css.remove(element, 'display');
    Attr.remove(element, 'aria-hidden');
  } else {
    Replacing.set(comp, [ ]);
    Css.set(element, 'display', 'none');
    Attr.set(element, 'aria-hidden', 'true');
  }
};
開發者ID:tinymce,項目名稱:tinymce,代碼行數:12,代碼來源:Throbber.ts

示例6: getBoxElement

 lastAnchor.get().each((anchor) => {
   const elem = lastElement.get().getOr(editor.selection.getNode());
   const nodeBounds = elem.getBoundingClientRect();
   const contentAreaBounds = editor.contentAreaContainer.getBoundingClientRect();
   const aboveEditor = nodeBounds.bottom < 0;
   const belowEditor = nodeBounds.top > contentAreaBounds.height;
   if (aboveEditor || belowEditor) {
     Css.set(contextbar.element(), 'display', 'none');
   } else {
     Css.remove(contextbar.element(), 'display');
     Positioning.positionWithin(sink, anchor, contextbar, getBoxElement());
   }
 });
開發者ID:tinymce,項目名稱:tinymce,代碼行數:13,代碼來源:ContextToolbar.ts

示例7: function

  const exit = function () {
    meta.restore();
    iosEvents.clear();
    iosApi.clear();

    mask.show();

    priorState.on(function (s) {
      s.socketHeight.each(function (h) {
        Css.set(platform.socket, 'height', h);
      });
      s.iframeHeight.each(function (h) {
        Css.set(platform.editor.getFrame(), 'height', h);
      });
      document.body.scrollTop = s.scrollTop;
    });
    priorState.clear();

    scrollEvents.on(function (s) {
      s.exclusives.unbind();
    });
    scrollEvents.clear();

    Class.remove(platform.container, Styles.resolve('fullscreen-maximized'));
    Thor.restoreStyles();
    Scrollable.deregister(platform.toolbar);

    Css.remove(platform.socket, 'overflow'/*, 'scroll'*/);
    Css.remove(platform.socket, '-webkit-overflow-scrolling'/*, 'touch'*/);

    // Hide the keyboard and remove the selection so there isn't a blue cursor in the content
    // still even once exited.
    Focus.blur(platform.editor.getFrame());

    PlatformEditor.getActiveApi(platform.editor).each(function (editorApi) {
      editorApi.clearSelection();
    });
  };
開發者ID:abstask,項目名稱:tinymce,代碼行數:38,代碼來源:IosMode.ts

示例8:

 AlloyEvents.run(autoSize, (comp, se) => {
   Css.remove(comp.element(), 'width');
 })
開發者ID:tinymce,項目名稱:tinymce,代碼行數:3,代碼來源:Sidebar.ts


注:本文中的@ephox/sugar.Css.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。