本文整理汇总了TypeScript中react-dnd-touch-backend.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: createDefaultMultiBackend
import { default as HTML5Backend } from "react-dnd-html5-backend";
import { default as TouchBackend } from "react-dnd-touch-backend";
import {
default as MultiBackend,
MouseTransition,
TouchTransition,
BackendTransition
} from "dnd-multi-backend";
import { BackendFactory } from 'dnd-core';
export const HTML5ToTouch = {
backends: [
{
backend: HTML5Backend,
transition: MouseTransition
},
{
backend: TouchBackend({ enableMouseEvents: false }),
preview: true,
transition: TouchTransition
}
] as BackendTransition[]
};
export function createDefaultMultiBackend(): BackendFactory {
return MultiBackend(HTML5ToTouch);
}
开发者ID:fossabot,项目名称:angular-skyhook,代码行数:27,代码来源:HTML5ToTouch.ts
示例2: customMultiBackend
import { MouseTransition, MultiBackend } from '@angular-skyhook/multi-backend';
import { BackendTransition, TouchTransition } from 'dnd-multi-backend';
import { BackendFactory } from 'dnd-core';
import { default as HTML5Backend } from 'react-dnd-html5-backend';
import { default as TouchBackend } from 'react-dnd-touch-backend';
const backendTransitions: BackendTransition[] = [
{
backend: HTML5Backend,
transition: MouseTransition,
},
{
backend: TouchBackend({
enableMouseEvents: false,
ignoreContextMenu: true,
delayTouchStart: 300 // milliseconds
}),
transition: TouchTransition,
preview: true,
}
];
export function customMultiBackend(): BackendFactory {
return MultiBackend({ backends: backendTransitions });
}
开发者ID:fossabot,项目名称:angular-skyhook,代码行数:25,代码来源:customMultiBackend.ts
示例3:
import * as ReactDnd from "react-dnd";
import TouchBackend from "react-dnd-touch-backend";
const component = () => null;
const dndComponent = ReactDnd.DragDropContext(TouchBackend)(component);
const dndComponentMouseEvents = ReactDnd.DragDropContext(TouchBackend({enableMouseEvents: true}))(component);
const dndComponentDelayTouchStart = ReactDnd.DragDropContext(TouchBackend({delayTouchStart: 200}))(component);
const dndComponentDelayMouseStart = ReactDnd.DragDropContext(TouchBackend({enableMouseEvents: true, delayMouseStart: 100}));
const dndComponentKeyboardEvents = ReactDnd.DragDropContext(TouchBackend({enableKeyboardEvents: true}));
const dndComponentOldDelay = ReactDnd.DragDropContext(TouchBackend({delay: 300}));
const dndComponentAllCurrentEvents = ReactDnd.DragDropContext(TouchBackend(
{enableKeyboardEvents: true, enableMouseEvents: true, delayMouseStart: 100, delayTouchStart: 200}));
const dndComponentWithScrollAngleRanges = ReactDnd.DragDropContext(TouchBackend(
{ scrollAngleRanges: [{ start: 0, end: 0 }, { start: 0 }, { end: 0 }] }));
const dndComponentWithTouchSlop = ReactDnd.DragDropContext(TouchBackend({ touchSlop: 0 }));
const dndComponentWithIgnoreContextMenu = ReactDnd.DragDropContext(TouchBackend({ ignoreContextMenu: true }));
开发者ID:VincentDamour,项目名称:DefinitelyTyped,代码行数:17,代码来源:react-dnd-touch-backend-tests.ts
示例4:
import * as ReactDnd from "react-dnd";
import TouchBackend from "react-dnd-touch-backend";
const component = () => null;
const dndComponent = ReactDnd.DragDropContext(TouchBackend)(component);
const dndComponentMouseEvents = ReactDnd.DragDropContext(TouchBackend({enableMouseEvents: true}))(component);
const dndComponentDelayTouchStart = ReactDnd.DragDropContext(TouchBackend({delayTouchStart: 200}))(component);
const dndComponentDelayMouseStart = ReactDnd.DragDropContext(TouchBackend({enableMouseEvents: true, delayMouseStart: 100}));
const dndComponentKeyboardEvents = ReactDnd.DragDropContext(TouchBackend({enableKeyboardEvents: true}));
const dndComponentOldDelay = ReactDnd.DragDropContext(TouchBackend({delay: 300}));
const dndComponentAllCurrentEvents = ReactDnd.DragDropContext(TouchBackend(
{enableKeyboardEvents: true, enableMouseEvents: true, delayMouseStart: 100, delayTouchStart: 200}));
开发者ID:AbraaoAlves,项目名称:DefinitelyTyped,代码行数:13,代码来源:react-dnd-touch-backend-tests.ts
示例5: createDragDropManager
import { createDragDropManager } from "dnd-core";
import TouchBackend from "react-dnd-touch-backend";
const context = {};
const dndComponent = createDragDropManager(TouchBackend(), context);
const dndComponentMouseEvents = createDragDropManager(TouchBackend({enableMouseEvents: true}), context);
const dndComponentDelayTouchStart = createDragDropManager(TouchBackend({delayTouchStart: 200}), context);
const dndComponentDelayMouseStart = createDragDropManager(TouchBackend({enableMouseEvents: true, delayMouseStart: 100}), context);
const dndComponentKeyboardEvents = createDragDropManager(TouchBackend({enableKeyboardEvents: true}), context);
const dndComponentOldDelay = createDragDropManager(TouchBackend({delay: 300}), context);
const dndComponentAllCurrentEvents = createDragDropManager(TouchBackend(
{enableKeyboardEvents: true, enableMouseEvents: true, delayMouseStart: 100, delayTouchStart: 200}), context);
const dndComponentWithScrollAngleRanges = createDragDropManager(TouchBackend(
{ scrollAngleRanges: [{ start: 0, end: 0 }, { start: 0 }, { end: 0 }] }), context);
const dndComponentWithTouchSlop = createDragDropManager(TouchBackend({ touchSlop: 0 }), context);
const dndComponentWithIgnoreContextMenu = createDragDropManager(TouchBackend({ ignoreContextMenu: true }), context);
开发者ID:CNBoland,项目名称:DefinitelyTyped,代码行数:17,代码来源:react-dnd-touch-backend-tests.ts
注:本文中的react-dnd-touch-backend.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论