@@ -5,6 +5,7 @@ const { Router } = require('modulor/router');
5
5
const { getStories } = require ( '../../js/story' ) ;
6
6
const Channel = require ( '../../js/channel' ) ;
7
7
const AddonsApi = require ( '../../addons' ) ;
8
+ const { getDefaultParams } = require ( '../../js/config' ) ;
8
9
9
10
const template = require ( './sandbox-manager.html' ) ;
10
11
@@ -42,14 +43,13 @@ class ManagerApp extends HTMLElement {
42
43
43
44
const firstStory = stories [ Object . keys ( stories ) [ 0 ] ] ;
44
45
const addonPanels = AddonsApi . getPanels ( ) ;
46
+ const defaultParams = getDefaultParams ( ) ;
45
47
46
- const DEFAULT_PARAMS = {
47
- width : 80 ,
48
- height : 75 ,
48
+ const DEFAULT_PARAMS = Object . assign ( { } , defaultParams , {
49
49
story : firstStory . storyName ,
50
50
storyKind : Object . keys ( firstStory . getStories ( ) ) [ 0 ] ,
51
51
addon : Object . keys ( addonPanels ) [ 0 ] ,
52
- } ;
52
+ } ) ;
53
53
54
54
this . router = new Router ( {
55
55
base : window . location . pathname ,
@@ -120,7 +120,7 @@ class ManagerApp extends HTMLElement {
120
120
* here all routes changes will be observed
121
121
* only query parameters will be used
122
122
* */
123
- this . router . add ( '* ' , ( path , query ) => {
123
+ this . router . add ( '(.*) ' , ( path , query ) => {
124
124
// set sizes
125
125
const width = Number ( query . width ) ;
126
126
const height = Number ( query . height ) ;
0 commit comments