+ const navigator = h(
+ "div",
+ {
+ "class": {
+ "hide": this.displayStyle == "all"
+ },
+ },
+ [
+ h(
+ "button",
+ {
+ "class": {
+ "btn": true,
+ },
+ on: {
+ click: () => {
+ this.index = Math.max(0, this.index - 1);
+ },
+ },
+ },
+ [ h("span", { "class": { "material-icon": true } }, "fast_rewind") ]
+ ), //onclick: index = max(0,index-1)
+ h("span",{ },(this.iidx+1).toString()),
+ h(
+ "button",
+ {
+ "class": {
+ "btn": true,
+ },
+ on: {
+ click: () => {
+ this.index = Math.min(this.index+1, this.questions.length-1)
+ },
+ },
+ },
+ [ h("span", { "class": { "material-icon": true } }, "fast_forward") ]
+ )
+ ]
+ );
+ domTree.push(navigator);
+ domTree.push(
+ h(
+ "button",
+ {
+ on: {
+ click: () => {
+ this.displayStyle = displayStyle == "compact" ? "all" : "compact";
+ },
+ },
+ },
+ this.displayStyle == "compact" ? "Show all" : "Navigator"
+ )
+ );