From 89a0c6fb308a3bc0309483fefaeaf4b5f46d2ffc Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Fri, 18 Jan 2019 09:57:43 +0200 Subject: [PATCH] Trigger mouse events at the center of arc --- test/specs/controller.polarArea.tests.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/specs/controller.polarArea.tests.js b/test/specs/controller.polarArea.tests.js index d439251fa4f..fed7979e939 100644 --- a/test/specs/controller.polarArea.tests.js +++ b/test/specs/controller.polarArea.tests.js @@ -281,12 +281,12 @@ describe('Chart.controllers.polarArea', function() { var chart = this.chart; var arc = chart.getDatasetMeta(0).data[0]; - jasmine.triggerMouseEvent(chart, 'mousemove', arc); + jasmine.triggerMouseEvent(chart, 'mousemove', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(49, 135, 221)'); expect(arc._model.borderColor).toBe('rgb(22, 89, 156)'); expect(arc._model.borderWidth).toBe(2); - jasmine.triggerMouseEvent(chart, 'mouseout', arc); + jasmine.triggerMouseEvent(chart, 'mouseout', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(100, 150, 200)'); expect(arc._model.borderColor).toBe('rgb(50, 100, 150)'); expect(arc._model.borderWidth).toBe(2); @@ -304,12 +304,12 @@ describe('Chart.controllers.polarArea', function() { chart.update(); - jasmine.triggerMouseEvent(chart, 'mousemove', arc); + jasmine.triggerMouseEvent(chart, 'mousemove', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(200, 100, 150)'); expect(arc._model.borderColor).toBe('rgb(150, 50, 100)'); expect(arc._model.borderWidth).toBe(8.4); - jasmine.triggerMouseEvent(chart, 'mouseout', arc); + jasmine.triggerMouseEvent(chart, 'mouseout', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(100, 150, 200)'); expect(arc._model.borderColor).toBe('rgb(50, 100, 150)'); expect(arc._model.borderWidth).toBe(2); @@ -327,12 +327,12 @@ describe('Chart.controllers.polarArea', function() { chart.update(); - jasmine.triggerMouseEvent(chart, 'mousemove', arc); + jasmine.triggerMouseEvent(chart, 'mousemove', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(200, 100, 150)'); expect(arc._model.borderColor).toBe('rgb(150, 50, 100)'); expect(arc._model.borderWidth).toBe(8.4); - jasmine.triggerMouseEvent(chart, 'mouseout', arc); + jasmine.triggerMouseEvent(chart, 'mouseout', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(100, 150, 200)'); expect(arc._model.borderColor).toBe('rgb(50, 100, 150)'); expect(arc._model.borderWidth).toBe(2); @@ -350,12 +350,12 @@ describe('Chart.controllers.polarArea', function() { chart.update(); - jasmine.triggerMouseEvent(chart, 'mousemove', arc); + jasmine.triggerMouseEvent(chart, 'mousemove', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(200, 100, 150)'); expect(arc._model.borderColor).toBe('rgb(150, 50, 100)'); expect(arc._model.borderWidth).toBe(8.4); - jasmine.triggerMouseEvent(chart, 'mouseout', arc); + jasmine.triggerMouseEvent(chart, 'mouseout', {_model: arc.getCenterPoint()}); expect(arc._model.backgroundColor).toBe('rgb(100, 150, 200)'); expect(arc._model.borderColor).toBe('rgb(50, 100, 150)'); expect(arc._model.borderWidth).toBe(2);