Toggle Vertical, 2nd

To rotate a toggle, I use the following workaround:

ZIM.js

zim.Toggle = function( ... , inherit, vertical) {
...
if(vertical) {
	this.rot(-90).mov(0,-height);
}

if (label) {
	this.addChild(label);
	if(vertical) {
		label.rot(90);
		label.x = height + 2 + margin + borderWidth;
		label.y = width/2;
		this.label = label;
		this.setBounds(-margin, -margin, height+margin*3+borderWidth+label.getBounds().width, Math.max(width+margin*2, label.getBounds().height));
	} else {
		label.x = width + 2 + margin + borderWidth;
		label.y = height/2;
		this.label = label;
		this.setBounds(-margin, -margin, width+margin*3+borderWidth+label.getBounds().width, Math.max(height+margin*2, label.getBounds().height));
	}
}

Use:

this.myToggle = new Toggle({
	label: new Label({text: "On\nOff", valign: "center"}),
	vertical: true
});

Okay - so we can look into that for the next version of ZIM. A vertical toggle could come in handy. Cheers.