var BlueprintNotice = View.extend(ToggleableView.prototype).extend({ el: "#blueprintNotice", events: { "click .next": "next", }, initialize: function(opt){ this.parent = opt.parent this.$notice = this.$(".notice") this.$next = this.$(".next") }, notice: function(msg){ this.$notice.html(msg) }, showCreateProjectNotice: function(){ this.notice("Start a new project with this blueprint.") this.$next.hide() this.nextFn = null this.show() }, showStartPositionNotice: function(){ this.parent.settings.hide() this.notice("First, click the map to set the starting location.") this.$next.show().html("Next") this.show() this.nextFn = this.showStartAngleNotice.bind(this) }, showStartAngleNotice: function(){ this.parent.settings.hide() this.notice("Next, rotate the camera to the desired orientation.") this.$next.show().html("Done") this.show() this.nextFn = this.doneSettingPosition.bind(this) this.parent.toolbar.toggleOrbitMode(false) }, doneSettingPosition: function(){ this.nextFn = null this.$next.hide() this.hide() this.parent.settings.show() this.parent.startPosition.rotationX = cam.rotationX this.parent.startPosition.rotationY = cam.rotationY this.parent.toolbar.toggleOrbitMode(true) this.parent.toolbar.orthoPolylineMode() }, nextFn: null, next: function(){ if (this.nextFn) { this.nextFn() } }, })