Skip to content

Commit

Permalink
#805: 2nd poc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Jun 6, 2018
1 parent 119157c commit 014bda3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/renderer/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ export default {
}
},
reportValidationSuccess: function() {
const hot = HotRegister.getInstance(this.currentHotId)
this.setHotComments(hot)
if (this.messagesType !== 'error') {
this.messagesTitle = 'Validation Success'
this.messages = 'No validation errors reported.'
Expand All @@ -563,7 +565,7 @@ export default {
// hot.updateSettings({cell: this.previousComments})
// this.commentsPlugin.refreshEditor(true)
// const previousComments = this.previousComments
const hot = HotRegister.getInstance(this.currentHotId)
// hot.render()
// _.delay(function(hot) {
// console.log('executing delay...')
Expand Down Expand Up @@ -1015,22 +1017,24 @@ export default {
hot.updateSettings({cell: this.previousComments})
this.previousComments = []
},
setHotComments: function(commentsPlugin, hot) {
setHotComments: function(hot) {
// const hot = HotRegister.getActiveInstance(this.currentHotId)
// console.log('inside hot comments setter')
for (const errorMessage of this.messages) {
// console.log(`error message`, errorMessage)
let range = this.getCellOrRowFromCount(hot, errorMessage.rowNumber, errorMessage.columnNumber)
this.setHotComment(hot, errorMessage)
// let range = this.getCellOrRowFromCount(hot, errorMessage.rowNumber, errorMessage.columnNumber)
// commentsPlugin.setRange(range)
// commentsPlugin.setComment(errorMessage.message)
this.previousComments.push({row: range.from.row, col: range.from.col, comment: {value: errorMessage.message}, renderer: this.errorHtmlRenderer})
// this.previousComments.push({row: range.from.row, col: range.from.col, comment: {value: errorMessage.message}, renderer: this.errorHtmlRenderer})
// wait for hot to update cells with comment class
// _.delay(this.updateCellsFromHotRange, 100, hot, range, this.addErrorHighlightStyle)
}
// hot.updateSettings(cell: this.previousComments)
},
setHotComment: function(commentsPlugin, errorMessage) {
setHotComment: function(hot, errorMessage) {
// console.time('setupPreviousComment')
const hot = HotRegister.getActiveInstance(this.currentHotId)
// const hot = HotRegister.getActiveInstance(this.currentHotId)
// console.timeEnd('getHot')
// console.log('inside hot comments single setter')
// for (const errorMessage of this.messages) {
Expand Down Expand Up @@ -1293,7 +1297,7 @@ export default {
// console.log('comments plugin is...', self.commentsPlugin)
// console.timeEnd('getError')
// console.time('setCommentInit')
self.setHotComment(self.commentsPlugin, nextError)
// self.setHotComment(nextError)
// console.timeEnd('setCommentInit')
})
},
Expand Down

0 comments on commit 014bda3

Please sign in to comment.