Skip to content

Commit

Permalink
Fix inconsistent cursor when resizing P2 (#2916)
Browse files Browse the repository at this point in the history
* Update ZenViewSplitter.mjs

Signed-off-by: Jai A P <[email protected]>

* Update ZenSidebarManager.mjs

Signed-off-by: Jai A P <[email protected]>

---------

Signed-off-by: Jai A P <[email protected]>
  • Loading branch information
Jai-JAP authored Nov 11, 2024
1 parent b323333 commit 9a7351b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/browser/base/zen-components/ZenSidebarManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
this._isDragging = true;

const isHorizontal = mouseDownEvent.target.getAttribute('orient') === 'horizontal';
setCursor(isHorizontal ? 'n-resize' : 'ew-resize');
setCursor(isHorizontal ? 'ns-resize' : 'ew-resize');
const reverse = ['left', 'top'].includes(mouseDownEvent.target.getAttribute('side'));
const direction = isHorizontal ? 'height' : 'width';
const axis = isHorizontal ? 'Y' : 'X';
Expand Down
2 changes: 1 addition & 1 deletion src/browser/base/zen-components/ZenViewSplitter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
});
}

setCursor(isVertical ? 'ew-resize' : 'n-resize');
setCursor(isVertical ? 'ew-resize' : 'ns-resize');
document.addEventListener('mousemove', dragFunc);
document.addEventListener('mouseup', () => {
document.removeEventListener('mousemove', dragFunc);
Expand Down

0 comments on commit 9a7351b

Please sign in to comment.