blacklight_range_limit 8.0.0 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8c8deb666a17d47f0972d7d85098ec88b0d980c12d92cd7fa554b943ee36ff6
4
- data.tar.gz: 7696cd12ba7d0c1b2ce4c4c451190ca36398edbae08edb2966dcb1575aa63692
3
+ metadata.gz: 4bb8b93b89024fcd0473c00ec2c2af5c747efe3647f4da5bf0bb3bbb3c21ac82
4
+ data.tar.gz: 3b1b0220a810e2013be9d6fdab54b4a43f60ad31459fb102b3f8e7cb72b64545
5
5
  SHA512:
6
- metadata.gz: 935f5b470677a89d09bd510b84be8319675ce0873da638218083dd54f328138737b39a0b1f0d0912e4ca18a163f47cd90b77136199a29eaadd662bed7e863d00
7
- data.tar.gz: 763fdb463b094db59d12ead36b0e44a487aeb3ca85e6608479de898868aa669a78ed52ca2c5e01aaf6651cefc780a2b8940aec576939a798c6f0104e75e25e9a
6
+ metadata.gz: 978737dd4c81790eff59f6289912ca056e8b7c43e3de40c009fbf386a8edd19d8d32ef8eef6017c98a81ed4f5f79b76d8da3014ae6f1ee84a32b02b64403550d
7
+ data.tar.gz: 56e8a2d086be0a5d09f8aad3d1046fa29f79cfee82447e0cd7efd1a2d7bc245a1f0d6934567db9faf133f505498d284c28adfd60dafa66c138d16fd64b0e6566
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.0.0
1
+ 8.0.1
@@ -12,6 +12,7 @@
12
12
  //= require 'flot/jquery.flot.browser.js'
13
13
  //= require 'flot/jquery.flot.saturated.js'
14
14
  //= require 'flot/jquery.flot.drawSeries.js'
15
+ //= require 'flot/jquery.event.drag.js'
15
16
  //= require 'flot/jquery.flot.hover.js'
16
17
  //= require 'flot/jquery.flot.uiConstants.js'
17
18
  //= require 'flot/jquery.flot.selection.js'
@@ -0,0 +1,145 @@
1
+ // Source: https://github.com/devongovett/jquery.event.drag/blob/451d90e1a737f49f613d0966082ce67582b0afd1/drag/jquery.event.drag.js
2
+ //
3
+ // Warning! Make sure the hijack() is patch to work with any jquery version:
4
+ //
5
+ // ($.event.dispatch || $.event.handle).call( elem, event );
6
+ //
7
+
8
+ /*!
9
+ jquery.event.drag.js ~ v1.6 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
10
+ Liscensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
11
+ */
12
+ ;(function($){ // secure $ jQuery alias
13
+ /*******************************************************************************************/
14
+ // Created: 2008-06-04 | Updated: 2009-04-21
15
+ /*******************************************************************************************/
16
+ // Events: drag, dragstart, dragend
17
+ /*******************************************************************************************/
18
+
19
+ // jquery method
20
+ $.fn.drag = function( fn1, fn2, fn3 ){
21
+ if ( fn2 ) this.bind('dragstart', fn1 ); // 2+ args
22
+ if ( fn3 ) this.bind('dragend', fn3 ); // 3 args
23
+ return !fn1 ? this.trigger('drag') // 0 args
24
+ : this.bind('drag', fn2 ? fn2 : fn1 ); // 1+ args
25
+ };
26
+
27
+ // local refs
28
+ var $event = $.event, $special = $event.special,
29
+
30
+ // special event configuration
31
+ drag = $special.drag = {
32
+ not: ':input', // don't begin to drag on event.targets that match this selector
33
+ distance: 0, // distance dragged before dragstart
34
+ which: 1, // mouse button pressed to start drag sequence
35
+ drop: false, // false to suppress drop events
36
+ dragging: false, // hold the active target element
37
+ setup: function( data ){
38
+ data = $.extend({
39
+ distance: drag.distance,
40
+ which: drag.which,
41
+ not: drag.not,
42
+ drop: drag.drop
43
+ }, data || {});
44
+ data.distance = squared( data.distance ); // x² + y² = distance²
45
+ $event.add( this, "mousedown", handler, data );
46
+ if ( this.attachEvent ) this.attachEvent("ondragstart", dontStart ); // prevent image dragging in IE...
47
+ },
48
+ teardown: function(){
49
+ $event.remove( this, "mousedown", handler );
50
+ if ( this === drag.dragging ) drag.dragging = drag.proxy = false; // deactivate element
51
+ selectable( this, true ); // enable text selection
52
+ if ( this.detachEvent ) this.detachEvent("ondragstart", dontStart ); // prevent image dragging in IE...
53
+ }
54
+ };
55
+
56
+ // prevent normal event binding...
57
+ $special.dragstart = $special.dragend = { setup:function(){}, teardown:function(){} };
58
+
59
+ // handle drag-releatd DOM events
60
+ function handler ( event ){
61
+ var elem = this, returned, data = event.data || {};
62
+ // mousemove or mouseup
63
+ if ( data.elem ){
64
+ // update event properties...
65
+ elem = event.dragTarget = data.elem; // drag source element
66
+ event.dragProxy = drag.proxy || elem; // proxy element or source
67
+ event.cursorOffsetX = data.pageX - data.left; // mousedown offset
68
+ event.cursorOffsetY = data.pageY - data.top; // mousedown offset
69
+ event.offsetX = event.pageX - event.cursorOffsetX; // element offset
70
+ event.offsetY = event.pageY - event.cursorOffsetY; // element offset
71
+ }
72
+ // mousedown, check some initial props to avoid the switch statement
73
+ else if ( drag.dragging || ( data.which>0 && event.which!=data.which ) ||
74
+ $( event.target ).is( data.not ) ) return;
75
+ // handle various events
76
+ switch ( event.type ){
77
+ // mousedown, left click, event.target is not restricted, init dragging
78
+ case 'mousedown':
79
+ $.extend( data, $( elem ).offset(), {
80
+ elem: elem, target: event.target,
81
+ pageX: event.pageX, pageY: event.pageY
82
+ }); // store some initial attributes
83
+ $event.add( document, "mousemove mouseup", handler, data );
84
+ selectable( elem, false ); // disable text selection
85
+ drag.dragging = null; // pending state
86
+ break; // prevents text selection in safari
87
+ // mousemove, check distance, start dragging
88
+ case !drag.dragging && 'mousemove':
89
+ if ( squared( event.pageX-data.pageX )
90
+ + squared( event.pageY-data.pageY ) // x² + y² = distance²
91
+ < data.distance ) break; // distance tolerance not reached
92
+ event.target = data.target; // force target from "mousedown" event (fix distance issue)
93
+ returned = hijack( event, "dragstart", elem ); // trigger "dragstart", return proxy element
94
+ if ( returned !== false ){ // "dragstart" not rejected
95
+ drag.dragging = elem; // activate element
96
+ drag.proxy = event.dragProxy = $( returned || elem )[0]; // set proxy
97
+ }
98
+ // mousemove, dragging
99
+ case 'mousemove':
100
+ if ( drag.dragging ){
101
+ returned = hijack( event, "drag", elem ); // trigger "drag"
102
+ if ( data.drop && $special.drop ){ // manage drop events
103
+ $special.drop.allowed = ( returned !== false ); // prevent drop
104
+ $special.drop.handler( event ); // "dropstart", "dropend"
105
+ }
106
+ if ( returned !== false ) break; // "drag" not rejected, stop
107
+ event.type = "mouseup"; // helps "drop" handler behave
108
+ }
109
+ // mouseup, stop dragging
110
+ case 'mouseup':
111
+ $event.remove( document, "mousemove mouseup", handler ); // remove page events
112
+ if ( drag.dragging ){
113
+ if ( data.drop && $special.drop ) $special.drop.handler( event ); // "drop"
114
+ hijack( event, "dragend", elem ); // trigger "dragend"
115
+ }
116
+ selectable( elem, true ); // enable text selection
117
+ drag.dragging = drag.proxy = data.elem = false; // deactivate element
118
+ break;
119
+ }
120
+ };
121
+
122
+ // set event type to custom value, and handle it
123
+ function hijack ( event, type, elem ){
124
+ event.type = type; // force the event type
125
+ var result = ($.event.dispatch || $.event.handle).call( elem, event );
126
+ return result===false ? false : result || event.result;
127
+ };
128
+
129
+ // return the value squared
130
+ function squared ( value ){ return Math.pow( value, 2 ); };
131
+
132
+ // suppress default dragstart IE events...
133
+ function dontStart(){ return ( drag.dragging === false ); };
134
+
135
+ // toggles text selection attributes
136
+ function selectable ( elem, bool ){
137
+ if ( !elem ) return; // maybe element was removed ?
138
+ elem = elem.ownerDocument ? elem.ownerDocument : elem;
139
+ elem.unselectable = bool ? "off" : "on"; // IE
140
+ if ( elem.style ) elem.style.MozUserSelect = bool ? "" : "none"; // FF
141
+ $.event[ bool ? "remove" : "add" ]( elem, "selectstart mousedown", dontStart ); // IE/Opera
142
+ };
143
+
144
+ /*******************************************************************************************/
145
+ })( jQuery ); // confine scope
@@ -826,8 +826,8 @@ Licensed under the MIT license.
826
826
  var expectedPs = s.datapoints.pointsize != null ? s.datapoints.pointsize : (s.data && s.data[0] && s.data[0].length ? s.data[0].length : 3);
827
827
  if (expectedPs > 2) {
828
828
  format.push({
829
- x: false,
830
- y: true,
829
+ x: s.bars.horizontal,
830
+ y: !s.bars.horizontal,
831
831
  number: true,
832
832
  required: false,
833
833
  computeRange: s.yaxis.options.autoScale !== 'none',
@@ -1761,7 +1761,7 @@ Licensed under the MIT license.
1761
1761
  }
1762
1762
  if (axis.options.showTickLabels === 'all') {
1763
1763
  var associatedSeries = series.filter(function(s) {
1764
- return s.xaxis === axis;
1764
+ return s.bars.horizontal ? s.yaxis === axis : s.xaxis === axis;
1765
1765
  }),
1766
1766
  notAllBarSeries = associatedSeries.some(function(s) {
1767
1767
  return !s.bars.show;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_range_limit
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-02-03 00:00:00.000000000 Z
12
+ date: 2021-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blacklight
@@ -244,6 +244,7 @@ files:
244
244
  - vendor/assets/javascripts/bootstrap-slider.js
245
245
  - vendor/assets/javascripts/flot/jquery.canvaswrapper.js
246
246
  - vendor/assets/javascripts/flot/jquery.colorhelpers.js
247
+ - vendor/assets/javascripts/flot/jquery.event.drag.js
247
248
  - vendor/assets/javascripts/flot/jquery.flot.browser.js
248
249
  - vendor/assets/javascripts/flot/jquery.flot.drawSeries.js
249
250
  - vendor/assets/javascripts/flot/jquery.flot.hover.js
@@ -271,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
272
  - !ruby/object:Gem::Version
272
273
  version: '0'
273
274
  requirements: []
274
- rubygems_version: 3.1.4
275
+ rubygems_version: 3.1.2
275
276
  signing_key:
276
277
  specification_version: 4
277
278
  summary: Blacklight Range Limit plugin