Skip to content

Commit

Permalink
Merge pull request #7 from yubowenok/dev
Browse files Browse the repository at this point in the history
replace the name 'contain-filter' by value-filter to stay consistent with paper
  • Loading branch information
yubowenok authored Oct 20, 2016
2 parents addf300 + 0cb7a15 commit 9e55c96
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 54 deletions.
12 changes: 6 additions & 6 deletions doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<li>
<a href="#nt-filter">Filter</a>
<ul class="nav nav-lv3">
<li><a href="#nt-contain-filter">Contain Filter</a></li>
<li><a href="#nt-value-filter">Value Filter</a></li>
<li><a href="#nt-range-filter">Range Filter</a></li>
<li><a href="#nt-sampler">Sampler</a></li>
</ul>
Expand Down Expand Up @@ -658,18 +658,18 @@ <h3>Filter</h3>
<tbody>
<tr>
<td>
<a id="nt-contain-filter" class="anchor"></a>
Contain Filter
<a id="nt-value-filter" class="anchor"></a>
Value Filter
</td>
<td><icon class="contain-filter"></icon></td>
<td><icon class="value-filter"></icon></td>
<td>
<p>
Passes through only the items with an attribute value that is equal to a given value, or contains the given value as a substring.
The given value can be specified as a regular expression.
Contain filter supports multiple filtering dimensions, in which case the same filtering value is used on every filtering dimension selected.
Value filter supports multiple filtering dimensions, in which case the same filtering value is used on every filtering dimension selected.
</p>
<p>
The filtering value is set using constants, which can either be entered directly in the Contain Filter's input box, or passed in via
The filtering value is set using constants, which can either be entered directly in the Value Filter's input box, or passed in via
the constant port.
</p>
</td>
Expand Down
6 changes: 3 additions & 3 deletions doc/doc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@
background-image: url('./imgs/property-mapping-icon.png');
}

&.contain-filter {
&.value-filter {
@include flat();
background-image: url('./imgs/contain-icon.png');
background-image: url('./imgs/value-filter-icon.png');
}

&.range-filter {
@include flat();
background-image: url('./imgs/range-icon.png');
background-image: url('./imgs/range-filter-icon.png');
}

&.sampler {
Expand Down
3 changes: 2 additions & 1 deletion gulp/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ var compile = function(cb, src) {
externs: externs,
output_wrapper: '(function(){%output%}).call(window);'
}
}).on('error', function() {
}).on('error', function(err) {
del([
'visflow.js'
]);
cb(err);
}));
};

Expand Down
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/filter/range-filter/range-filter.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.visflow .node.range-filter {
&.minimized > .icon {
background-image: url('./imgs/range-icon.png');
background-image: url('./imgs/range-filter-icon.png');
}

&.details {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
* @fileoverview Contain filter defs.
* @fileoverview Value filter defs.
*/

/** @inheritDoc */
visflow.ContainFilter.prototype.TEMPLATE =
'./dist/html/filter/contain-filter/contain-filter.html';
visflow.ValueFilter.prototype.TEMPLATE =
'./dist/html/filter/value-filter/value-filter.html';
/** @inheritDoc */
visflow.ContainFilter.prototype.PANEL_TEMPLATE =
'./dist/html/filter/contain-filter/contain-filter-panel.html';
visflow.ValueFilter.prototype.PANEL_TEMPLATE =
'./dist/html/filter/value-filter/value-filter-panel.html';
/** @inheritDoc */
visflow.ContainFilter.prototype.NODE_NAME = 'Contain Filter';
visflow.ValueFilter.prototype.NODE_NAME = 'Value Filter';
/** @inheritDoc */
visflow.ContainFilter.prototype.NODE_CLASS = 'contain-filter';
visflow.ValueFilter.prototype.NODE_CLASS = 'value-filter';

/** @inheritDoc */
visflow.ContainFilter.prototype.defaultOptions = function() {
return new visflow.options.ContainFilter({
visflow.ValueFilter.prototype.defaultOptions = function() {
return new visflow.options.ValueFilter({
// Dimensions to be filtered on.
dims: [],
// Whether input is treated as normal text or regex.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* @fileoverview VisFlow contain filter module.
* @fileoverview VisFlow Value Filter module.
*/

/**
* @param {!Object} params
* @constructor
* @extends {visflow.Filter}
*/
visflow.ContainFilter = function(params) {
visflow.ContainFilter.base.constructor.call(this, params);
visflow.ValueFilter = function(params) {
visflow.ValueFilter.base.constructor.call(this, params);

/** @inheritDoc */
this.ports = {
Expand Down Expand Up @@ -40,19 +40,19 @@ visflow.ContainFilter = function(params) {
this.value = [];
};

_.inherit(visflow.ContainFilter, visflow.Filter);
_.inherit(visflow.ValueFilter, visflow.Filter);

/** @inheritDoc */
visflow.ContainFilter.prototype.deserialize = function(save) {
visflow.ContainFilter.base.deserialize.call(this, save);
visflow.ValueFilter.prototype.deserialize = function(save) {
visflow.ValueFilter.base.deserialize.call(this, save);
if (save.typeInValue) {
this.options.typeInValue = save.typeInValue;
}
};

/** @inheritDoc */
visflow.ContainFilter.prototype.showDetails = function() {
visflow.ContainFilter.base.showDetails.call(this);
visflow.ValueFilter.prototype.showDetails = function() {
visflow.ValueFilter.base.showDetails.call(this);

var units = [
// Dimension
Expand Down Expand Up @@ -91,7 +91,7 @@ visflow.ContainFilter.prototype.showDetails = function() {
};

/** @inheritDoc */
visflow.ContainFilter.prototype.process = function() {
visflow.ValueFilter.prototype.process = function() {
var port = this.ports['inVal'];
var pack;
if (port.connected()) {
Expand Down Expand Up @@ -121,7 +121,7 @@ visflow.ContainFilter.prototype.process = function() {
};

/** @inheritDoc */
visflow.ContainFilter.prototype.filter = function() {
visflow.ValueFilter.prototype.filter = function() {
// Slow implementation: Linear scan
var inpack = /** @type {!visflow.Package} */(this.ports['in'].pack);
var outpack = this.ports['out'].pack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* @fileoverview Container filter options.
* @fileoverview Value filter options.
*/

/**
* @param {!Object} params
* @extends {visflow.options.Node}
* @constructor
*/
visflow.options.ContainFilter = function(params) {
visflow.options.ContainFilter.base.constructor.call(this, params);
visflow.options.ValueFilter = function(params) {
visflow.options.ValueFilter.base.constructor.call(this, params);

/**
* Dimensions to be filtered on.
Expand Down Expand Up @@ -44,4 +44,4 @@ visflow.options.ContainFilter = function(params) {
params.typeInValue : null;
};

_.inherit(visflow.options.ContainFilter, visflow.options.Node);
_.inherit(visflow.options.ValueFilter, visflow.options.Node);
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* @fileoverview Contain filter panel functions.
* @fileoverview Value filter panel functions.
*/

/** @inheritDoc */
visflow.ContainFilter.prototype.initPanel = function(container) {
visflow.ValueFilter.prototype.initPanel = function(container) {
var units = [
// Dimension
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="contain-filter">
<div class="value-filter">
<div id="dims" class="section"></div>
<div id="value" class="section"></div>
<div id="mode" class="section"></div>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.visflow .node.contain-filter {
.visflow .node.value-filter {
&.minimized > .icon {
background-image: url('./imgs/contain-icon.png');
background-image: url('./imgs/value-filter-icon.png');
}

&.details {
Expand Down
5 changes: 3 additions & 2 deletions src/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ visflow.flow.NODE_CONSTRUCTORS_ = {
minus: visflow.Minus,
union: visflow.Union,
range: visflow.RangeFilter,
contain: visflow.ContainFilter,
value: visflow.ValueFilter,
sampler: visflow.Sampler,
valueExtractor: visflow.ValueExtractor,
valueMaker: visflow.ValueMaker,
Expand All @@ -140,7 +140,8 @@ visflow.flow.NODE_CONSTRUCTORS_ = {
* @const @private {!Object<string>}
*/
visflow.flow.OBSOLETE_TYPES_ = {
bandLimiter: 'sampler'
bandLimiter: 'sampler',
contain: 'value'
};

/**
Expand Down
12 changes: 6 additions & 6 deletions src/panel/node-panel/node-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<div id="histogram" class="panel-button" title="Histogram" data-placement="right">
<img class="square-icon" src="imgs/histogram-icon.png"/>
</div>
<div id="line-chart" class="panel-button" title="Line Chart" data-placement="right">
<img class="square-icon" src="imgs/line-chart-icon.png"/>
</div>
<div id="heatmap" class="panel-button" title="Heatmap" data-placement="right">
<img class="square-icon" src="imgs/heatmap-icon.png"/>
</div>
<div id="line-chart" class="panel-button" title="Line Chart" data-placement="right">
<img class="square-icon" src="imgs/line-chart-icon.png"/>
</div>
<div id="network" class="panel-button" title="Network" data-placement="right">
<img class="square-icon" src="imgs/network-icon.png"/>
</div>
Expand All @@ -29,10 +29,10 @@
<img class="square-icon" src="imgs/property-mapping-icon.png"/>
</div>
<div id="range" class="panel-button" title="Range Filter" data-placement="right">
<img class="flat-icon" src="imgs/range-icon.png"/>
<img class="flat-icon" src="imgs/range-filter-icon.png"/>
</div>
<div id="contain" class="panel-button" title="Contain Filter" data-placement="right">
<img class="flat-icon" src="imgs/contain-icon.png"/>
<div id="value" class="panel-button" title="Value Filter" data-placement="right">
<img class="flat-icon" src="imgs/value-filter-icon.png"/>
</div>
<div id="sampler" class="panel-button" title="Sampler" data-placement="right">
<img class="flat-icon" src="imgs/sampler-icon.png"/>
Expand Down
6 changes: 3 additions & 3 deletions src/panel/popup-panel/popup-panel-compact.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<div class="group">
<hr>
<div title="Range Filter" id="range" class="panel-button">
<img class="flat-icon" src="imgs/range-icon.png"/>
<img class="flat-icon" src="imgs/range-filter-icon.png"/>
</div>
<div title="Contain Filter"id="contain" class="panel-button">
<img class="flat-icon" src="imgs/contain-icon.png"/>
<div title="Value Filter"id="value" class="panel-button">
<img class="flat-icon" src="imgs/value-filter-icon.png"/>
</div>
<div title="Sampler" id="sampler" class="panel-button">
<img class="flat-icon" src="imgs/sampler-icon.png"/>
Expand Down
8 changes: 4 additions & 4 deletions src/panel/popup-panel/popup-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
<p>Filter</p>
<hr>
<div id="range" class="panel-button">
<img class="flat-icon" src="imgs/range-icon.png"/>
<img class="flat-icon" src="imgs/range-filter-icon.png"/>
<div class="text">Range Filter</div>
</div>
<div id="contain" class="panel-button">
<img class="flat-icon" src="imgs/contain-icon.png"/>
<div class="text">Contain Filter</div>
<div id="value" class="panel-button">
<img class="flat-icon" src="imgs/value-filter-icon.png"/>
<div class="text">Value Filter</div>
</div>
</div>

Expand Down

0 comments on commit 9e55c96

Please sign in to comment.