Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion demo/right-to-left(rtl).html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ <h1>RTL Demo</h1>
{x: 6, y: 0, w: 2, h: 2},
];
items.forEach((item, i) => item.content = 'item ' + i);
let grid = GridStack.init({rtl: true, children: items});
let grid = GridStack.init({
rtl: true,
float: true,
children: items,
resizable: {handles: 'sw,se'}
});

function addWidget() {
let w = {
Expand Down
7 changes: 0 additions & 7 deletions src/gridstack.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
position: relative;
}

.grid-stack-rtl {
direction: ltr;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you don't want that set by default because ??? you're more knowlegable on this than me so I will defer this to you. Just trying to understand to amke sure things work out of the box

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielgindi please explain

> .grid-stack-item {
direction: rtl;
}
}

.grid-stack-placeholder > .placeholder-content {
background-color: rgba(0,0,0,0.1);
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export interface GridStackOptions {
row?: number;

/**
* if true turns grid to RTL. Possible values are true, false, 'auto' (default?: 'auto')
* if true turns grid to RTL, and applies the `grid-stack-rtl class`. Possible values are true, false, 'auto' (default?: 'auto')
* See [example](http://gridstack.github.io/gridstack.js/demo/right-to-left(rtl).html)
*/
rtl?: boolean | 'auto';
Expand Down