Skip to content

Commit

Permalink
feat: add move cursor style with edgeDraggable #703
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jul 21, 2022
1 parent 6e102cf commit 9901deb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ function getDraggableEvent(e: any) {
return { ...e, datas };
}
export default makeAble("edgeDraggable", {
css: [
`:host[data-able-edgedraggable] .direction.line:not(.edge) {
cursor: move;
}`,
],
dragControlCondition(moveable: MoveableManagerInterface<DraggableProps>, e: any) {
if (!moveable.props.edgeDraggable || !e.inputEvent) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export function renderDirectionControls(
});
}
export function renderLine(
React: Renderer, direction: string,
React: Renderer,
direction: string,
pos1: number[], pos2: number[],
zoom: number,
key: number | string, ...classNames: string[]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default function App() {
e.target.style.transform = e.transform;
}}
onResize={e => {
console.log(e.width);
e.target.style.width = `${e.width}px`;
e.target.style.height = `${e.height}px`;
e.target.style.transform = e.drag.transform;
Expand Down

0 comments on commit 9901deb

Please sign in to comment.