File tree Expand file tree Collapse file tree 6 files changed +14
-4
lines changed Expand file tree Collapse file tree 6 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ Blockly.Flyout = function(workspaceOptions) {
60
60
* Flyout should be laid out horizontally vs vertically.
61
61
* @type {boolean }
62
62
*/
63
- this . horizontalLayout_ = false ;
63
+ this . horizontalLayout_ = workspaceOptions . horizontalLayout ;
64
64
65
65
/**
66
66
* Opaque data that can be passed to Blockly.unbindEvent_.
Original file line number Diff line number Diff line change @@ -125,6 +125,10 @@ Blockly.parseOptions_ = function(options) {
125
125
if ( hasSounds === undefined ) {
126
126
hasSounds = true ;
127
127
}
128
+ var horizontalLayout = options [ 'horizontalLayout' ] ;
129
+ if ( horizontalLayout === undefined ) {
130
+ horizontalLayout = false ;
131
+ }
128
132
}
129
133
var hasScrollbars = options [ 'scrollbars' ] ;
130
134
if ( hasScrollbars === undefined ) {
@@ -201,6 +205,7 @@ Blockly.parseOptions_ = function(options) {
201
205
hasTrashcan : hasTrashcan ,
202
206
hasSounds : hasSounds ,
203
207
hasCss : hasCss ,
208
+ horizontalLayout : horizontalLayout ,
204
209
languageTree : languageTree ,
205
210
gridOptions : gridOptions ,
206
211
zoomOptions : zoomOptions ,
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ Blockly.Toolbox = function(workspace) {
64
64
* @type {boolean }
65
65
* @private
66
66
*/
67
- this . horizontalLayout_ = false ;
67
+ this . horizontalLayout_ = workspace . options . horizontalLayout ;
68
68
69
69
if ( this . horizontalLayout_ ) {
70
70
this . CONFIG_ [ 'cssTreeRow' ] =
@@ -148,7 +148,8 @@ Blockly.Toolbox.prototype.init = function() {
148
148
var workspaceOptions = {
149
149
disabledPatternId : workspace . options . disabledPatternId ,
150
150
parentWorkspace : workspace ,
151
- RTL : workspace . RTL
151
+ RTL : workspace . RTL ,
152
+ horizontalLayout : workspace . horizontalLayout
152
153
} ;
153
154
154
155
/**
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ Blockly.Workspace = function(opt_options) {
43
43
this . options = opt_options || { } ;
44
44
/** @type {boolean } */
45
45
this . RTL = ! ! this . options . RTL ;
46
+ /** @type {boolean } */
47
+ this . horizontalLayout = ! ! this . options . horizontalLayout ;
46
48
/** @type {!Array.<!Blockly.Block> } */
47
49
this . topBlocks_ = [ ] ;
48
50
} ;
Original file line number Diff line number Diff line change @@ -294,7 +294,8 @@ Blockly.WorkspaceSvg.prototype.addFlyout_ = function() {
294
294
var workspaceOptions = {
295
295
disabledPatternId : this . options . disabledPatternId ,
296
296
parentWorkspace : this ,
297
- RTL : this . RTL
297
+ RTL : this . RTL ,
298
+ horizontalLayout : this . horizontalLayout
298
299
} ;
299
300
/** @type {Blockly.Flyout } */
300
301
this . flyout_ = new Blockly . Flyout ( workspaceOptions ) ;
Original file line number Diff line number Diff line change 33
33
scrollbars : true ,
34
34
toolbox : toolbox ,
35
35
trashcan : true ,
36
+ horizontalLayout : true ,
36
37
zoom : {
37
38
controls : true ,
38
39
wheel : false ,
You can’t perform that action at this time.
0 commit comments