mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 17:22:25 -05:00
Add ModelView ImageComponent (#7106)
* Add ModelView ImageComponent * Remove duplicate property declarations * Fix sqlops too
This commit is contained in:
@@ -107,6 +107,13 @@ class ModelBuilderImpl implements azdata.ModelBuilder {
|
||||
return builder;
|
||||
}
|
||||
|
||||
image(): azdata.ComponentBuilder<azdata.ImageComponent> {
|
||||
let id = this.getNextComponentId();
|
||||
let builder: ComponentBuilderImpl<azdata.ImageComponent> = this.getComponentBuilder(new ImageComponentWrapper(this._proxy, this._handle, id), id);
|
||||
this._componentBuilders.set(id, builder);
|
||||
return builder;
|
||||
}
|
||||
|
||||
radioButton(): azdata.ComponentBuilder<azdata.RadioButtonComponent> {
|
||||
let id = this.getNextComponentId();
|
||||
let builder: ComponentBuilderImpl<azdata.RadioButtonComponent> = this.getComponentBuilder(new RadioButtonWrapper(this._proxy, this._handle, id), id);
|
||||
@@ -1118,6 +1125,42 @@ class TextComponentWrapper extends ComponentWrapper implements azdata.TextCompon
|
||||
}
|
||||
}
|
||||
|
||||
class ImageComponentWrapper extends ComponentWrapper implements azdata.ImageComponentProperties {
|
||||
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
super(proxy, handle, ModelComponentTypes.Image, id);
|
||||
this.properties = {};
|
||||
}
|
||||
|
||||
public get src(): string {
|
||||
return this.properties['src'];
|
||||
}
|
||||
public set src(v: string) {
|
||||
this.setProperty('src', v);
|
||||
}
|
||||
|
||||
public get alt(): string {
|
||||
return this.properties['alt'];
|
||||
}
|
||||
public set alt(v: string) {
|
||||
this.setProperty('alt', v);
|
||||
}
|
||||
|
||||
public get height(): number | string {
|
||||
return this.properties['height'];
|
||||
}
|
||||
public set height(v: number | string) {
|
||||
this.setProperty('height', v);
|
||||
}
|
||||
|
||||
public get width(): number | string {
|
||||
return this.properties['width'];
|
||||
}
|
||||
public set width(v: number | string) {
|
||||
this.setProperty('width', v);
|
||||
}
|
||||
}
|
||||
|
||||
class TableComponentWrapper extends ComponentWrapper implements azdata.TableComponent {
|
||||
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
|
||||
Reference in New Issue
Block a user