From 31662c49f5b8b4eb46f1219a37708cb783004069 Mon Sep 17 00:00:00 2001 From: Dan Ghost Date: Wed, 7 Jun 2017 16:47:31 +0100 Subject: [PATCH] Fixed issue where the scope of the containment for the draggable items wasn't tied to the component view. If more than one PPQ was rendered on the page, the pins would be lost on the subsequent components once a user attempted to drag a pin. --- js/adapt-ppq.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/adapt-ppq.js b/js/adapt-ppq.js index 5cddc90..0f4c5f2 100644 --- a/js/adapt-ppq.js +++ b/js/adapt-ppq.js @@ -123,12 +123,14 @@ define(function(require) { }, onQuestionRendered:function() { - this.$('.ppq-pinboard-container-inner').imageready(_.bind(function() { + var $pinboardContainerInner = this.$('.ppq-pinboard-container-inner'); + + $pinboardContainerInner.imageready(_.bind(function() { for (var i=0, l=this._pinViews.length; i