Commit 28c86411 authored by GuiΩ's avatar GuiΩ
Browse files

refactor(QuestionTooltip): add question_id as field in event

parent 0021504f
......@@ -78,8 +78,8 @@ export default {
},
methods: {
click(event) {
console.log('questionPosee', this.questionPosee.id)
this.$emit('show-question-tooltip', {event: event, question_id: this.questionPosee.question})
event.question_id = this.questionPosee.question
this.$emit('show-question-tooltip', event)
},
/**
* iniates the dataTransfer for a drag
......
......@@ -45,8 +45,8 @@ export default {
this.visible = true;
this.$nextTick(() => {
// updates position of context menu
this.$el.style.left = (data.event.pageX || data.event.clientX) + 'px';
this.$el.style.top = ((data.event.pageY || data.event.clientY) - window.pageYOffset) + 'px';
this.$el.style.left = (data.pageX || data.clientX) + 'px';
this.$el.style.top = ((data.pageY || data.clientY) - window.pageYOffset) + 'px';
// make element focused
this.$el.focus();
});
......
......@@ -94,7 +94,6 @@ const mutations = {
* @param data = {question_id: integer, scores: list of reals}
*/
'SCORES_OF_QUESTION'(state, {classe_id, theme_id, question_id, scores}) {
console.log('scores of question', question_id, scores)
Vue.set(state.scores[classe_id][theme_id], question_id, scores)
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment