fix: lock component
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.2",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/dooringx-lib.esm.js",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { RefObject } from 'react';
|
||||
import { blockFocus, containerFocusRemove } from '../focusHandler';
|
||||
import { blockFocus } from '../focusHandler';
|
||||
import { marklineConfig } from '../markline/marklineConfig';
|
||||
import { resizerMouseMove, resizerMouseUp } from '../resizeHandler';
|
||||
import { selectRangeMouseMove, selectData, selectRangeMouseUp } from '../selectRange';
|
||||
@@ -22,14 +22,16 @@ export const innerDrag = function (
|
||||
onMouseDown: (e: React.MouseEvent) => {
|
||||
//e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (!item.canDrag) {
|
||||
containerFocusRemove(config).onMouseDown(e);
|
||||
return;
|
||||
}
|
||||
blockFocus(e, item, config);
|
||||
|
||||
if (item.id && innerDragState.lastClick && item.id !== innerDragState.lastClick.id) {
|
||||
contextMenuState.unmountContextMenu();
|
||||
}
|
||||
//candrag给选中,不给拖
|
||||
blockFocus(e, item, config);
|
||||
if (!item.canDrag) {
|
||||
//containerFocusRemove(config).onMouseDown(e);
|
||||
return;
|
||||
}
|
||||
innerDragState.lastClick = item;
|
||||
|
||||
if (item.position === 'static') {
|
||||
|
@@ -185,7 +185,7 @@ export function BlockResizer(props: BlockResizerProps) {
|
||||
const rotate = props.data.rotate.value;
|
||||
const cursorMap = getCursor(rotate);
|
||||
const render = useMemo(() => {
|
||||
if (props.data.focus && props.data.resize) {
|
||||
if (props.data.focus && props.data.resize && props.data.canDrag) {
|
||||
return (
|
||||
<>
|
||||
{directionArr.map((v) => {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* @Author: yehuozhili
|
||||
* @Date: 2021-07-21 20:51:58
|
||||
* @LastEditors: yehuozhili
|
||||
* @LastEditTime: 2021-07-27 14:53:15
|
||||
* @LastEditTime: 2021-07-27 16:32:30
|
||||
* @FilePath: \dooringx\packages\dooringx-lib\src\core\rotateHandler\index.tsx
|
||||
*/
|
||||
import React from 'react';
|
||||
@@ -90,7 +90,7 @@ interface RotateResizerProps {
|
||||
}
|
||||
export function RotateResizer(props: RotateResizerProps) {
|
||||
const render = useMemo(() => {
|
||||
if (props.data.focus && props.data.rotate.canRotate) {
|
||||
if (props.data.focus && props.data.rotate.canRotate && props.data.canDrag) {
|
||||
return (
|
||||
<div
|
||||
onMouseDown={(e) => {
|
||||
|
Reference in New Issue
Block a user