Closed serkanserttop closed 7 years ago
Just to note, couple lines above in __addPanel
function, options are passed in:
https://github.com/WebCabin/wcDocker/blob/cef106512d1c125bd40a6612d7a107912d64100a/Code/docker.js#L293
https://github.com/WebCabin/wcDocker/blob/cef106512d1c125bd40a6612d7a107912d64100a/Code/docker.js#L295
Similar discussion in https://github.com/WebCabin/wcDocker/issues/77
@xblox Thanks for the answer.
Any reason why this line https://github.com/WebCabin/wcDocker/blob/cef106512d1c125bd40a6612d7a107912d64100a/Code/docker.js#L326
is not the below?
panel._panelObject = new panelType.options.onCreate(panel, panelOptions, options);
Then onCreate function's arguments would be (panel, options, dynamicOptions). I can call
wcDockerInstance.addPanel('panelType', wcDocker.DOCK.STACKED, parent, {id: 'xyz'});
I believe this must be a common pattern and I am confused why people are not complaining about this. Am I missing something?
FYI, I am new to the library, so I apologize if I misunderstood something.