Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Commit

Permalink
Make the popover fading logic simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kovalyov committed Mar 11, 2017
1 parent 6d4183e commit fd333bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
2 changes: 0 additions & 2 deletions TODO
Expand Up @@ -19,6 +19,4 @@ Planned/ongoing projects:

Blockers for the next release (jQuery removal):

- Popover fading logic is commented out in Chart.js
- When you click to edit a color popover disappears
- Whatever TKs are still in the code
26 changes: 0 additions & 26 deletions src/client/Chart.js
Expand Up @@ -45,7 +45,6 @@ export default class Chart {
yRangeUnstacked: Array<any>;
yRange: Array<any>;
selectedX: number;
mouseTimer: ?number;
focusedSeriesIndex: number;
margin: {top: number, right: number, bottom: number, left: number};
width: number;
Expand Down Expand Up @@ -487,31 +486,6 @@ export default class Chart {
dom.classlist.add(this.container, 'active')
dom.classlist.add(document.body, 'page-active')

if (this.mouseTimer) {
clearTimeout(this.mouseTimer)
this.mouseTimer = null
}

this.mouseTimer = setTimeout(() => {
/** TK
if (this.$optionsElem.length && this.$optionsElem.is(':hover')) {
return
}
if (this.$chartDescription.length && this.$chartDescription.is(':hover')) {
return
}
if (this.$pageSettings.length && this.$pageSettings.is(':hover')) {
return
}
*/

dom.classlist.remove(this.container, 'active')
dom.classlist.remove(document.body, 'page-active')
dom.classlist.remove(this.pageSettings, 'open')
}, 1000)

// don't change the selection if mouseover is below the plot
let plotRect = dom.rect(this.plot)
if (ev.clientY - plotRect.top > plotRect.height) return
Expand Down

0 comments on commit fd333bd

Please sign in to comment.