usveticic@3064: // widget_customhtml.ysl2
dgaberscek@2944:
edouard@3241: widget_desc("CustomHtml") {
edouard@3241: longdesc
edouard@3241: ||
edouard@3241: CustomHtml widget allows insertion of HTML code in a svg:foreignObject.
edouard@3241: Widget content is replaced by foreignObject. HTML code is obtained from
edouard@3241: "code" labeled text content. HTML insert position and size is given with
edouard@3241: "container" labeled element.
edouard@3241: ||
edouard@3241:
edouard@3241: shortdesc > Custom HTML insert
edouard@3241:
edouard@3241: // TODO: support reload and POST based on variable content
edouard@3241: }
edouard@3241:
edouard@3232: widget_class("CustomHtml"){
usveticic@3009: ||
usveticic@3009: frequency = 5;
usveticic@3064: widget_size = undefined;
usveticic@3009:
usveticic@3056: dispatch(value) {
usveticic@3059: this.request_animate();
usveticic@3056: }
usveticic@3056:
usveticic@3059: animate(){
usveticic@3059: }
usveticic@3009:
usveticic@3059: init() {
usveticic@3064: this.widget_size = this.container_elt.getBBox();
usveticic@3064: this.element.innerHTML =' '+
usveticic@3064: this.code_elt.textContent+
usveticic@3064: ' ';
usveticic@3059: }
usveticic@3009: ||
Edouard@3024: }
usveticic@3009:
usveticic@3009:
edouard@3232: widget_defs("CustomHtml") {
usveticic@3064: labels("container code");
edouard@3000: }