Closed gkresic closed 7 years ago
@gkresic have a look at https://github.com/openlayers/openlayers/blob/81acbc0f254fe51136c649ace357350043217383/externs/readme.md OpenLayers uses the olx namespace to declare objects with object literals as externs. Trough that this saves them from renaming by the closure compiler. All these classes don't have an explicit constructor. From my point of view we could wrap this in the standard namespace 'ol' in the way like the option classes are wrapped. For example:
ol.FrameState:
package ol;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class FrameState {
or as interface if we don't want to create own instances but why not? 😄
Agree.
Meanwhile, I've implemented my feature using com.google.gwt.animation.client.AnimationScheduler
so I didn't need olx.FrameState
, but if I encounter some other olx.* class, I'll implement it in ol namespace as you suggested.
I'm not even sure what is the purpose of this namespace in OpenLayers, but I'm wondering if gwt-ol3 should support it?
One use case is to support ol.render.Event which references olx.FrameState. I'm planning to use it for animations like shown in this example.