Skip to content

Commit

Permalink
#6328 grid.header.Toolbar: using draggable.grid.header.toolbar.SortZo…
Browse files Browse the repository at this point in the history
…ne, scss file, drag start positioning
  • Loading branch information
tobiu committed Jan 29, 2025
1 parent a6a5050 commit 2450a08
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.neo-grid-header-toolbar.neo-dragproxy {
.neo-button {
border-right: 1px solid var(--grid-container-border-color);
margin : 1px;
}
}
15 changes: 9 additions & 6 deletions src/draggable/grid/header/toolbar/SortZone.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,17 @@ class SortZone extends BaseSortZone {
itemStyle = item.style || {};
rect = itemRects[index];

console.log(me.ownerRect.left, rect.left);
rect.x -= ownerRect.x;
rect.y -= ownerRect.y;

item.style = Object.assign(itemStyle, {
height : `${rect.height}px`,
left : `${rect.left - ownerRect.left}px`,
position: 'absolute',
top : `${rect.top - ownerRect.top}px`,
width : `${rect.width}px`
height : `${rect.height}px`,
left : `${rect.left}px`,
margin : '1px',
pointerEvents: 'none',
position : 'absolute',
top : `${rect.top}px`,
width : `${rect.width}px`
})
});

Expand Down
2 changes: 1 addition & 1 deletion src/grid/header/Toolbar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Toolbar extends BaseToolbar {
let me = this;

if (value && !me.sortZone) {
import('../../draggable/toolbar/SortZone.mjs').then(module => {
import('../../draggable/grid/header/toolbar/SortZone.mjs').then(module => {
let {appName, id, windowId} = me;

me.sortZone = Neo.create({
Expand Down

0 comments on commit 2450a08

Please sign in to comment.