fix topic card draggability
This commit is contained in:
parent
ad26a7fb2b
commit
4eab4cefe8
1 changed files with 8 additions and 9 deletions
|
@ -14,15 +14,6 @@ import ReactTopicCard from '../../components/TopicCard'
|
||||||
|
|
||||||
const TopicCard = {
|
const TopicCard = {
|
||||||
openTopicCard: null, // stores the topic that's currently open
|
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) {
|
populateShowCard: function(topic) {
|
||||||
var self = TopicCard
|
var self = TopicCard
|
||||||
const topicCardObj = {
|
const topicCardObj = {
|
||||||
|
@ -36,6 +27,14 @@ const TopicCard = {
|
||||||
React.createElement(ReactTopicCard, topicCardObj),
|
React.createElement(ReactTopicCard, topicCardObj),
|
||||||
document.getElementById('showcard')
|
document.getElementById('showcard')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// initialize draggability
|
||||||
|
$('.showcard').draggable({
|
||||||
|
handle: '.metacodeImage',
|
||||||
|
stop: function() {
|
||||||
|
$(this).height('auto')
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
showCard: function(node, opts) {
|
showCard: function(node, opts) {
|
||||||
var self = TopicCard
|
var self = TopicCard
|
||||||
|
|
Loading…
Add table
Reference in a new issue