From 4eab4cefe82941a0e100caa844d5080002b66942 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 28 Jan 2017 15:59:22 -0500 Subject: [PATCH] fix topic card draggability --- frontend/src/Metamaps/Views/TopicCard.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/frontend/src/Metamaps/Views/TopicCard.js b/frontend/src/Metamaps/Views/TopicCard.js index e3772c74..3cbe5f9a 100644 --- a/frontend/src/Metamaps/Views/TopicCard.js +++ b/frontend/src/Metamaps/Views/TopicCard.js @@ -14,15 +14,6 @@ import ReactTopicCard from '../../components/TopicCard' const TopicCard = { openTopicCard: null, // stores the topic that's currently open - init: function() { - // initialize topic card draggability and resizability - $('.showcard').draggable({ - handle: '.metacodeImage', - stop: function() { - $(this).height('auto') - } - }) - }, populateShowCard: function(topic) { var self = TopicCard const topicCardObj = { @@ -36,6 +27,14 @@ const TopicCard = { React.createElement(ReactTopicCard, topicCardObj), document.getElementById('showcard') ) + + // initialize draggability + $('.showcard').draggable({ + handle: '.metacodeImage', + stop: function() { + $(this).height('auto') + } + }) }, showCard: function(node, opts) { var self = TopicCard