svghmi/widget_back.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Mon, 03 May 2021 00:14:11 +0200
branchsvghmi
changeset 3237 d000a91d1e95
parent 3232 7bdb766c2a4d
child 3241 fe945f1f48b7
permissions -rw-r--r--
SVGHMI: Intermediate state while updating UI, preparing for displaying widget description and multiple variables selections
// widget_back.ysl2

widget_class("Back")
    ||
        on_click(evt) {
            if(jump_history.length > 1){
               jump_history.pop();
               let [page_name, index] = jump_history.pop();
               switch_page(page_name, index);
            }
        }
        init() {
            this.element.setAttribute("onclick", "hmi_widgets['"+this.element_id+"'].on_click(evt)");
        }
    ||