morrisjs-rails 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45e6c7dea9af4ad673b2099893a2660870ab6a08
4
- data.tar.gz: faf9927817aa156869084ff6670de11f0043fab4
3
+ metadata.gz: f923dc042465196b9c10b7f2c2852ec8a16a9aab
4
+ data.tar.gz: 76d995547a0bddd0547e4736da1b2fe4de130a6e
5
5
  SHA512:
6
- metadata.gz: b4b2f994aa2b24003880404f4e5a4ee1bb33d90fae36341d2e2ae0665c1d993afffaf765e044f3823b5465468c10c4649c1c62f74e53f00f3d3a9b2ec277b13a
7
- data.tar.gz: 0b4aaeddc989fefc7a28f718773eb724a5c5fbfa419704e81571cd73c4f484d42f6d03d005815e6962635e4761e37f7833b8c85f52dea4bcf7f9add8478029d6
6
+ metadata.gz: a1847bd076074917b41d5b7938a37cdd59e8a998181a92219c32f073b46c7765e9635b5b85d31611c6375d926de5af78b91eb6d11a9eb3ff6281aa8365cc23d7
7
+ data.tar.gz: 0020bbfcdf9e3024e1ae17d22122750520ec659d6e98b3d4aa14301939fb4af089f0e2a4bf75ad1a18f2eb3768840ba8797d41c9c8b61f32bb8dfd379b401098
@@ -1,5 +1,5 @@
1
1
  module Morrisjs
2
2
  module Rails
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /* @license
2
- morris.js v0.5.0
2
+ morris.js v0.5.1
3
3
  Copyright 2014 Olly Smith All rights reserved.
4
4
  Licensed under the BSD-2-Clause License.
5
5
  */
@@ -127,8 +127,7 @@ Licensed under the BSD-2-Clause License.
127
127
  var offset, touch;
128
128
  touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0];
129
129
  offset = _this.el.offset();
130
- _this.fire('hover', touch.pageX - offset.left, touch.pageY - offset.top);
131
- return touch;
130
+ return _this.fire('hovermove', touch.pageX - offset.left, touch.pageY - offset.top);
132
131
  });
133
132
  this.el.bind('click', function(evt) {
134
133
  var offset;
@@ -160,6 +159,7 @@ Licensed under the BSD-2-Clause License.
160
159
  return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
161
160
  });
162
161
  }
162
+ this.el.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');
163
163
  if (this.postInit) {
164
164
  this.postInit();
165
165
  }
@@ -663,9 +663,13 @@ Licensed under the BSD-2-Clause License.
663
663
  }
664
664
 
665
665
  Hover.prototype.update = function(html, x, y) {
666
- this.html(html);
667
- this.show();
668
- return this.moveTo(x, y);
666
+ if (!html) {
667
+ return this.hide();
668
+ } else {
669
+ this.html(html);
670
+ this.show();
671
+ return this.moveTo(x, y);
672
+ }
669
673
  };
670
674
 
671
675
  Hover.prototype.html = function(content) {
@@ -744,7 +748,6 @@ Licensed under the BSD-2-Clause License.
744
748
  xLabels: 'auto',
745
749
  xLabelFormat: null,
746
750
  xLabelMargin: 24,
747
- continuousLine: true,
748
751
  hideHover: false
749
752
  };
750
753
 
@@ -850,7 +853,7 @@ Licensed under the BSD-2-Clause License.
850
853
  };
851
854
 
852
855
  Line.prototype.generatePaths = function() {
853
- var c, coords, i, r, smooth;
856
+ var coords, i, r, smooth;
854
857
  return this.paths = (function() {
855
858
  var _i, _ref, _ref1, _results;
856
859
  _results = [];
@@ -871,19 +874,6 @@ Licensed under the BSD-2-Clause License.
871
874
  }
872
875
  return _results1;
873
876
  }).call(this);
874
- if (this.options.continuousLine) {
875
- coords = (function() {
876
- var _j, _len, _results1;
877
- _results1 = [];
878
- for (_j = 0, _len = coords.length; _j < _len; _j++) {
879
- c = coords[_j];
880
- if (c.y !== null) {
881
- _results1.push(c);
882
- }
883
- }
884
- return _results1;
885
- })();
886
- }
887
877
  if (coords.length > 1) {
888
878
  _results.push(Morris.Line.createPath(coords, smooth, this.bottom));
889
879
  } else {
@@ -1496,7 +1486,7 @@ Licensed under the BSD-2-Clause License.
1496
1486
  Bar.prototype.drawSeries = function() {
1497
1487
  var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
1498
1488
  groupWidth = this.width / this.options.data.length;
1499
- numBars = this.options.stacked != null ? 1 : this.options.ykeys.length;
1489
+ numBars = this.options.stacked ? 1 : this.options.ykeys.length;
1500
1490
  barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
1501
1491
  if (this.options.barSize) {
1502
1492
  barWidth = Math.min(barWidth, this.options.barSize);
@@ -1530,6 +1520,9 @@ Licensed under the BSD-2-Clause License.
1530
1520
  left += sidx * (barWidth + this.options.barGap);
1531
1521
  }
1532
1522
  size = bottom - top;
1523
+ if (this.options.verticalGridCondition && this.options.verticalGridCondition(row.x)) {
1524
+ this.drawBar(this.left + idx * groupWidth, this.top, groupWidth, Math.abs(this.top - this.bottom), this.options.verticalGridColor, this.options.verticalGridOpacity, this.options.barRadius);
1525
+ }
1533
1526
  if (this.options.stacked) {
1534
1527
  top -= lastTop;
1535
1528
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morrisjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - beanie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-20 00:00:00.000000000 Z
11
+ date: 2014-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties