Skip to content

Commit 6d820f7

Browse files
committed
Add "selectdirection" layout attribute
1 parent d3ff96b commit 6d820f7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/components/fx/layout_attributes.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,17 @@ module.exports = {
101101
].join(' ')
102102
},
103103
editType: 'none'
104+
},
105+
selectdirection: {
106+
valType: 'enumerated',
107+
role: 'info',
108+
values: ['h', 'v', 'd', 'any'],
109+
dflt: 'any',
110+
description: [
111+
'When "dragmode" is set to "select", this limits the selection of the drag to',
112+
'horizontal, vertical or diagonal. "h" only allows horizontal selection,',
113+
'"v" only vertical, "d" only diagonal and "any" sets no limit.'
114+
].join(' '),
115+
editType: 'none'
104116
}
105117
};

src/components/fx/layout_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
1717
}
1818

1919
coerce('dragmode');
20+
coerce('selectdirection', 'any');
2021

2122
var hovermodeDflt;
2223
if(layoutOut._has('cartesian')) {

0 commit comments

Comments
 (0)