• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript react-dnd-touch-backend.default函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript react-dom.findDOMNode函数代码示例发布时间:2022-05-25
下一篇:
TypeScript react-dnd-test-backend.TestBackend类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap