Skip to content

Commit

Permalink
Pulled in some updates from 1.0dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Fairgrieve authored and Scott Fairgrieve committed Dec 16, 2016
1 parent 0702f96 commit b7a8b2a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
13 changes: 9 additions & 4 deletions dist/leaflet-dvf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ L.HTMLUtils = {
var value = obj[property];
if (typeof value === 'object') {
var container = document.createElement('div');
container.appendChild(L.HTMLUtils.buildTable(value, ignoreFields));
container.appendChild(L.HTMLUtils.buildTable(value, className, ignoreFields));
value = container.innerHTML;
}

Expand Down Expand Up @@ -1822,7 +1822,8 @@ L.Animation = L.Class.extend({
this._inProgress = false;
this.fire('end');
}
});;// @preserve This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
});
;// @preserve This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
// Adapted from: https://raw.github.com/mbostock/d3/master/lib/colorbrewer/colorbrewer.js
L.ColorBrewer = {
Sequential: {
Expand Down Expand Up @@ -8043,7 +8044,8 @@ L.Graph = L.DataLayer.extend({

L.Graph = L.Graph.extend({
options: {
getEdge: L.Graph.EDGESTYLE.STRAIGHT
getEdge: L.Graph.EDGESTYLE.STRAIGHT,
useLocationText: true
},
_getLayer: function (location, layerOptions, record) {
location.location.setStyle(layerOptions);
Expand All @@ -8060,6 +8062,9 @@ L.Graph = L.Graph.extend({
var fromLocation = this.options.locationMode.call(this, fromValue, fromValue);
var toLocation = this.options.locationMode.call(this, toValue, toValue);

var fromText = this.options.useLocationText && fromLocation ? fromLocation.text : fromValue;
var toText = this.options.useLocationText && toLocation ? toLocation.text : toValue;

// Get from location
// Get to location
// Create a line (arced or straight) connecting the two locations
Expand All @@ -8074,7 +8079,7 @@ L.Graph = L.Graph.extend({
location = {
center: bounds.getCenter(),
location: line,
text: fromValue + ' - ' + toValue
text: this.options.getLocationText ? this.options.getLocationText.call(this, record) : fromText + ' - ' + toText
};
}
}
Expand Down
5 changes: 3 additions & 2 deletions dist/leaflet-dvf.markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ L.HTMLUtils = {
var value = obj[property];
if (typeof value === 'object') {
var container = document.createElement('div');
container.appendChild(L.HTMLUtils.buildTable(value, ignoreFields));
container.appendChild(L.HTMLUtils.buildTable(value, className, ignoreFields));
value = container.innerHTML;
}

Expand Down Expand Up @@ -1822,7 +1822,8 @@ L.Animation = L.Class.extend({
this._inProgress = false;
this.fire('end');
}
});;// @preserve This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
});
;// @preserve This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
// Adapted from: https://raw.github.com/mbostock/d3/master/lib/colorbrewer/colorbrewer.js
L.ColorBrewer = {
Sequential: {
Expand Down
Loading

0 comments on commit b7a8b2a

Please sign in to comment.