Hi guys,
Some of you know I have a branch going to remove Cesium-specific logic from Dojo-specific widgets. This began life as “helpers” with the intention of being a simple helper function to take the place of the “Skeleton” or “Hello World” example code which keeps getting repeated everywhere. Within an hour of development it had easily swallowed all of the logic in Widgets/Dojo/CesiumWidget (the widget that has no UI on it, just a bare globe). There was hardly anything Dojo-specific inside the widget, so on my branch that widget is now an empty shell that just requires in the functionality from the non-Dojo “helper” widget.
I’m thinking I should ditch the name “helpers” and go back to calling it a widget, because that’s what it turned into. But, the “Widgets” directory is excluded from the Cesium.js combine step, and I specifically wrote this to be included in that step, because the whole point is to make the code available to projects that aren’t using Dojo and/or require.js.
Options: I could call it a “widget” (which it is), and move it to the widgets folder, and then have the build script specifically include or exclude individual files from the “Widgets” folder and its subfolders (which might get messy). Or, I could have the build script include the top level of “Widgets” but not any of its sub-folders, which would be reserved for Dojo and other 3rd-party toolkit widgets. This would pull in the Timeline widget (the non-Dojo one, not to be confused with its Dojo counterpart of the very same name). That won’t work well currently because of a dependency on a graphic, but eventually I’d like to replace all our icons with SVG anyway (that’s a separate topic). So I think in the meantime I should just have the build script exclude all of Widgets, then re-include the new non-Dojo Cesium widget.
It’s certainly not a perfect solution. Comments? Ideas?
--Ed.