drop support for the old layout. only v2 supported as of now.

This commit is contained in:
Manuel Friedli 2014-06-27 12:44:38 +02:00
parent 4942cfda2f
commit a9d8888f6a

6
uhr.js
View file

@ -289,19 +289,15 @@ function UhrRenderer(layout, renderarea) {
UhrRenderer.prototype.render = function(uhr, beforeshow) { UhrRenderer.prototype.render = function(uhr, beforeshow) {
var renderer = this; var renderer = this;
var letters; var letters;
if (this.layout.version !== undefined) {
switch (this.layout.version) { switch (this.layout.version) {
case 2: case 2:
var delegate = new _UhrRendererV2Delegate(this.layout); var delegate = new _UhrRendererV2Delegate(this.layout);
letters = delegate.parse(); letters = delegate.parse();
break; break;
default: default:
console.error("Unknown layout version: " + this.layout.version); console.warn("Unknown layout version: '" + this.layout.version + "'");
return; return;
} }
} else {
letters = renderer.layout.values;
}
this.renderarea.fadeOut('fast', function() { this.renderarea.fadeOut('fast', function() {
renderer.renderarea.empty(); renderer.renderarea.empty();
for (var y = 0; y < letters.length; y++) { for (var y = 0; y < letters.length; y++) {