From 595b2be1e37d27d91a41535d34ef338e7aeb8e7d Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 12 Oct 2018 16:38:32 +0100 Subject: [PATCH] Added directions! --- src/v1/js/Goto.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/v1/js/Goto.js b/src/v1/js/Goto.js index 2bafdfd..defb6fc 100644 --- a/src/v1/js/Goto.js +++ b/src/v1/js/Goto.js @@ -56,7 +56,7 @@ const GotoCardView = Backbone.View.extend({ console.log(`${eventName } was triggered!`); });*/ - this.model.bind('change:directions', this.doUpdateRender, this); + this.model.bind('change:directions', this.doRender, this); this.eventBus.on('showDirections', this.showDirectionsPanel, this); }, @@ -100,7 +100,7 @@ const GotoCardView = Backbone.View.extend({ this.model.set('detail', detail); // if (prevGuid === guid) - this.doRender(); + // this.doRender(); }, 'events': { 'click .closebutton': 'doClick' @@ -119,17 +119,19 @@ const GotoCardView = Backbone.View.extend({ this.$el.empty(); // this.$el.html(this.template(this.model.get('article'))); this.$el.html(this.template()); - }, - 'doUpdateRender': function() { - // this.$el.empty(); - // this.$el.html(this.template(this.model.get('article'))); - const html = templates.templateDirections({ 'directions':this.model.get('directions') }); console.log(html); const $el = this.$el; $el.find('#gotoDetailsText').html(html); + }, + 'doUpdateRender': function() { + // this.$el.empty(); + // this.$el.html(this.template(this.model.get('article'))); + + + } });