@asymmetrik/angular2-sentio
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -1,2 +0,2 @@ | ||
/*! @asymmetrik/angular2-sentio-2.0.1 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/ | ||
/*! @asymmetrik/angular2-sentio-2.0.2 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/ | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
@@ -1,2 +0,2 @@ | ||
/*! @asymmetrik/angular2-sentio-2.0.1 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/ | ||
/*! @asymmetrik/angular2-sentio-2.0.2 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o():"function"==typeof define&&define.amd?define(o):o()}(this,function(){"use strict";var e=require("./sentio.module");exports.SentioModule=e.SentioModule}); |
@@ -21,4 +21,4 @@ import { ElementRef } from '@angular/core'; | ||
* Determines the numerical dimension given a string representation | ||
* Assumes the string is in the form "NNNNN"px"", more specifically | ||
* an arbitrarily long sequence of digits terminated by "px" | ||
* Assumes the string is in the form 'NNNNNpx', more specifically | ||
* an arbitrarily long sequence of digits terminated by 'px' | ||
* | ||
@@ -25,0 +25,0 @@ * @param dimStr A string representation of the pixel size |
@@ -18,4 +18,4 @@ "use strict"; | ||
* Determines the numerical dimension given a string representation | ||
* Assumes the string is in the form "NNNNN"px"", more specifically | ||
* an arbitrarily long sequence of digits terminated by "px" | ||
* Assumes the string is in the form 'NNNNNpx', more specifically | ||
* an arbitrarily long sequence of digits terminated by 'px' | ||
* | ||
@@ -22,0 +22,0 @@ * @param dimStr A string representation of the pixel size |
@@ -34,6 +34,4 @@ "use strict"; | ||
(null != current && null != previous | ||
&& current.length === previous.length | ||
&& current[0] === previous[0] | ||
&& current[1] === previous[1] | ||
&& current[2] === previous[2])) { | ||
&& current[1] === previous[1])) { | ||
return false; | ||
@@ -80,13 +78,2 @@ } | ||
this.chart.dispatch().on('filterend', function (fs) { | ||
// We are externally representing the filter as undefined or a two element array | ||
// So, convert the filter state to the two value format | ||
if (null == fs || (fs.length > 0 && fs[0])) { | ||
fs = undefined; | ||
} | ||
else if (fs.length > 2) { | ||
fs = fs.slice(1, 3); | ||
} | ||
else if (fs.length !== 2) { | ||
fs = undefined; | ||
} | ||
// If the filter actually changed, emit the event | ||
@@ -98,5 +85,5 @@ if (_this.didFilterChange(fs, _this.filterState)) { | ||
// register for the marker events | ||
this.chart.dispatch().on('markerMouseover', function (p) { _this.markerClick.emit(p); }); | ||
this.chart.dispatch().on('markerMouseout', function (p) { _this.markerOver.emit(p); }); | ||
this.chart.dispatch().on('markerClick', function (p) { _this.markerOut.emit(p); }); | ||
this.chart.dispatch().on('markerMouseover', function (p) { _this.markerOver.emit(p); }); | ||
this.chart.dispatch().on('markerMouseout', function (p) { _this.markerOut.emit(p); }); | ||
this.chart.dispatch().on('markerClick', function (p) { _this.markerClick.emit(p); }); | ||
}; | ||
@@ -103,0 +90,0 @@ TimelineLineDirective.prototype.ngOnChanges = function (changes) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Angular 2 components for Sentio", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Asymmetrik, Ltd.", | ||
@@ -8,0 +8,0 @@ "copyright": "Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.", |
import { ElementRef } from '@angular/core'; | ||
import * as d3 from 'd3'; | ||
/** | ||
@@ -38,4 +36,4 @@ * Base Directive Object for all charts | ||
* Determines the numerical dimension given a string representation | ||
* Assumes the string is in the form "NNNNN"px"", more specifically | ||
* an arbitrarily long sequence of digits terminated by "px" | ||
* Assumes the string is in the form 'NNNNNpx', more specifically | ||
* an arbitrarily long sequence of digits terminated by 'px' | ||
* | ||
@@ -42,0 +40,0 @@ * @param dimStr A string representation of the pixel size |
@@ -70,6 +70,4 @@ import { Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, SimpleChange, Output } from '@angular/core'; | ||
(null != current && null != previous | ||
&& current.length === previous.length | ||
&& current[0] === previous[0] | ||
&& current[1] === previous[1] | ||
&& current[2] === previous[2])) { | ||
&& current[1] === previous[1])) { | ||
return false; | ||
@@ -99,14 +97,2 @@ } | ||
// We are externally representing the filter as undefined or a two element array | ||
// So, convert the filter state to the two value format | ||
if (null == fs || (fs.length > 0 && fs[0])) { | ||
fs = undefined; | ||
} | ||
else if (fs.length > 2) { | ||
fs = fs.slice(1, 3); | ||
} | ||
else if (fs.length !== 2) { | ||
fs = undefined; | ||
} | ||
// If the filter actually changed, emit the event | ||
@@ -119,5 +105,5 @@ if (this.didFilterChange(fs, this.filterState)) { | ||
// register for the marker events | ||
this.chart.dispatch().on('markerMouseover', (p) => { this.markerClick.emit(p); }); | ||
this.chart.dispatch().on('markerMouseout', (p) => { this.markerOver.emit(p); }); | ||
this.chart.dispatch().on('markerClick', (p) => { this.markerOut.emit(p); }); | ||
this.chart.dispatch().on('markerMouseover', (p) => { this.markerOver.emit(p); }); | ||
this.chart.dispatch().on('markerMouseout', (p) => { this.markerOut.emit(p); }); | ||
this.chart.dispatch().on('markerClick', (p) => { this.markerClick.emit(p); }); | ||
@@ -124,0 +110,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
103987
1719