if (window.attachEvent) //IE { window.attachEvent("onload", initApp); } if (window.addEventListener)//Firefox { window.addEventListener("load", initApp,false); } function initGame() { var myControl = new Control(); }
public static string ResolveUrl(this HtmlHelper html, string virtualUrl) { Control con = new Control(); var RelativeUrl = con.ResolveUrl(virtualUrl); if (!virtualUrl.StartsWith("~/")) return RelativeUrl; virtualUrl = virtualUrl.Remove(0, 2); string applicationPath = html.ViewContext.HttpContext.Request.ApplicationPath; if (string.IsNullOrEmpty(applicationPath) || !applicationPath.EndsWith("/")) { applicationPath = applicationPath + "/"; } return applicationPath + virtualUrl; } }
/** * Give the Control ID * * @return control id */ public String getControlId() { return ControlImpl.getControlId(getJSObject()); }
public Control getSource() { JSObject object = getSourceJSObject(); return (object != null) ? Control.narrowToControl(object) : null; }
@Override public boolean deactivate() { if (this.clickHandler != null) { this.clickHandler.deactivate(); } return super.deactivate(); }
@Override public boolean activate() { if (this.getMap() != null) { if (this.clickHandler == null) { this.clickHandler = new ClickHandler(this, this.clickHandlerOptions); } this.clickHandler.activate(); } return super.activate(); }
/** * {Boolean} If true, position will be update regularly. * * @param watch */ public void setWatch(boolean watch) { super.getJSObject().setProperty("watch", watch); }
public Control getSource(){ JSObject object = getSourceJSObject(); return (object!=null)?Control.narrowToControl(object):null; }
constructor() { this.ctrl = new Control(); this.ctrl.valueChanges.delay(3000).subscribe((value) => { this.func(); });
/** * Enable the Control * */ public void enable() { ControlImpl.enable(getJSObject()); }
/** * * @return Previous Control */ public Control getPrevious() { return Control.narrowToControl(NavigationHistoryImpl.getPrevious(getJSObject())); }
public static Control narrowToControl(JSObject object) { return new Control(object); }
/** * Disable Control * */ public void disable() { ControlImpl.disable(getJSObject()); }
/** * APIMethod: getControl * * Parameters: id - {String} ID of the control to return. * * Returns: {<OpenLayers.Control>} The control from the map's list of * controls which has a matching 'id'. If none found, returns null. */ public Control getControl(String controlID) { JSObject jsObject = MapImpl.getControl(getJSObject(), controlID); return (jsObject != null) ? Control.narrowToControl(jsObject) : null; }
public static Control narrowToControl(JSObject object){ return new Control(object); }
/** * {Boolean} If true, map center will be set on location update. * * @param bind */ public void setBind(boolean bind) { super.getJSObject().setProperty("bind", bind); }
/** * * @return Next Control */ public Control getNext() { return Control.narrowToControl(NavigationHistoryImpl.getNext(getJSObject())); }
var oControl = new Control({ click: this.performAction.bind(this) });
public boolean activate() { return ControlImpl.activate(getJSObject()); }
public Control getControlsByClass(String className) { JSObject jsObject = MapImpl.getControlsByClass(getJSObject(), className); return Control.narrowToControl(jsObject); }