当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript imagetools.ResultConversions类代码示例

本文整理汇总了TypeScript中@ephox/imagetools.ResultConversions的典型用法代码示例。如果您正苦于以下问题:TypeScript ResultConversions类的具体用法?TypeScript ResultConversions怎么用?TypeScript ResultConversions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ResultConversions类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

    return function () {
      const state = tempState || currentState;

      ResultConversions.blobToImageResult(state.blob).
        then(function (ir) {
          fn.apply(this, [ir].concat(args)).then(imageResultToBlob).then(addTempState);
        });
    };
开发者ID:danielpunkass,项目名称:tinymce,代码行数:8,代码来源:Dialog.ts

示例2: update

 function update(value) {
   ResultConversions.blobToImageResult(currentState.blob).
     then(function (ir) {
       return filter(ir, value);
     }).
     then(imageResultToBlob).
     then(function (blob) {
       const newTempState = createState(blob);
       displayState(newTempState);
       destroyState(tempState);
       tempState = newTempState;
     });
 }
开发者ID:danielpunkass,项目名称:tinymce,代码行数:13,代码来源:Dialog.ts

示例3: crop

  function crop() {
    const rect = imagePanel.selection();

    ResultConversions.blobToImageResult(currentState.blob).
      then(function (ir) {
        ImageTransformations.crop(ir, rect.x, rect.y, rect.w, rect.h).
          then(imageResultToBlob).
          then(function (blob) {
            addBlobState(blob);
            cancel();
          });
      });
  }
开发者ID:danielpunkass,项目名称:tinymce,代码行数:13,代码来源:Dialog.ts

示例4: block

 const blobManipulate = (anyInSystem: AlloyComponent, blob: Blob, filter: (ir: ImageResult) => ImageResult | PromiseLike<ImageResult>, action: (blob: Blob) => string, swap: () => void): Promise<Option<Element>> => {
   block(anyInSystem);
   return ResultConversions.blobToImageResult(blob).
     then(filter).
     then(imageResultToBlob).
     then(action).
     then((url) => {
       return updateSrc(anyInSystem, url).then((oImg) => {
         updateButtonUndoStates(anyInSystem);
         swap();
         unblock(anyInSystem);
         return oImg;
       });
     }).catch((err) => {
       console.log(err); // TODO: Notify the user?
       unblock(anyInSystem);
       return err;
     });
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:19,代码来源:ImageTools.ts


注:本文中的@ephox/imagetools.ResultConversions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。