ela 3.0.0 → 3.1.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/css/screen.styl +2 -2
- data/app/js/lib/views/axis_handler.coffee +2 -2
- data/app/js/lib/views/base_app.coffee +1 -0
- data/app/js/lib/views/chart_js.coffee +2 -0
- data/app/js/lib/views/graph_view.coffee +4 -0
- data/app/js/lib/views/viewport.coffee +17 -2
- data/lib/ela/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb4619edb649e36852192e36da53215947d80d99
|
|
4
|
+
data.tar.gz: 3a616aa2061220cacf65b61e4abec4bd48ae0342
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b01324e4bdf443a77ddc9bfbbc4dde41ab03ed4c6d5ba8d053de507800b1ecfe969c84451c6085d3cc955fc1c3e20e79ecca7f73e4ae58c7669f99dc7f56936b
|
|
7
|
+
data.tar.gz: 706e1209962ced109b068074ac30ff55c70ee4bc2c5c73e95da7eac180efcfe306f25aaa2494755b4b5cc4025aa8a6edc319757ae6b52daa9c69eb5fdb440e3d
|
data/Gemfile.lock
CHANGED
data/app/css/screen.styl
CHANGED
|
@@ -113,10 +113,9 @@ li.share-form
|
|
|
113
113
|
content "\f00d"
|
|
114
114
|
|
|
115
115
|
article.viewport
|
|
116
|
-
display
|
|
116
|
+
display grid
|
|
117
117
|
|
|
118
118
|
.view
|
|
119
|
-
flex 1
|
|
120
119
|
display flex
|
|
121
120
|
flex-direction column
|
|
122
121
|
border-right 1px solid #bbb
|
|
@@ -218,6 +217,7 @@ article.viewport
|
|
|
218
217
|
z-layer 'section', 'graph'
|
|
219
218
|
flex 1
|
|
220
219
|
overflow hidden
|
|
220
|
+
position relative
|
|
221
221
|
|
|
222
222
|
div.graph-overlay-wrapper
|
|
223
223
|
height 0
|
|
@@ -36,10 +36,10 @@ class ELA.Views.AxisHandler extends Backbone.Poised.View
|
|
|
36
36
|
if @orientation is 'x'
|
|
37
37
|
width = @displayParams.get('width')
|
|
38
38
|
point = (range / width) *
|
|
39
|
-
(e.gesture.
|
|
39
|
+
(e.gesture.center.x - graphOffset.left - origin)
|
|
40
40
|
else # @orientation is 'y'
|
|
41
41
|
height = @displayParams.get('height')
|
|
42
|
-
y = e.gesture.
|
|
42
|
+
y = e.gesture.center.y - graphOffset.top
|
|
43
43
|
y = Math.min(Math.max(y, 0), height)
|
|
44
44
|
point = (range / height) * (origin - y)
|
|
45
45
|
|
|
@@ -11,6 +11,8 @@ class ELA.Views.ChartJS extends Backbone.Poised.View
|
|
|
11
11
|
$.extend @chartConfig.options.title,
|
|
12
12
|
fontFamily: 'Roboto'
|
|
13
13
|
fontStyle: '500'
|
|
14
|
+
$.extend @chartConfig.options,
|
|
15
|
+
maintainAspectRatio: false
|
|
14
16
|
@dataFunction = options.dataFunction
|
|
15
17
|
@params = options.params
|
|
16
18
|
|
|
@@ -106,6 +106,10 @@ class ELA.Views.GraphView extends ELA.Views.ViewportView
|
|
|
106
106
|
curves: @curves
|
|
107
107
|
axisLabelingForCurve: @axisLabelingForCurve
|
|
108
108
|
localePrefix: @localePrefix
|
|
109
|
+
if @leftAxisHandler?
|
|
110
|
+
view.$el.on('tap', @subviews.leftAxisHandler.updateValue)
|
|
111
|
+
if @bottomAxisHandler?
|
|
112
|
+
view.$el.on('tap', @subviews.bottomAxisHandler.updateValue)
|
|
109
113
|
$graph.html(view.render().el)
|
|
110
114
|
|
|
111
115
|
this
|
|
@@ -13,14 +13,29 @@ class ELA.Views.Viewport extends Backbone.Poised.View
|
|
|
13
13
|
|
|
14
14
|
@subviews = {}
|
|
15
15
|
|
|
16
|
+
@layout = options.layout or
|
|
17
|
+
[ _.map(@views, (view, idx) -> String.fromCharCode(97 + idx)).join(' ') ]
|
|
18
|
+
|
|
19
|
+
_style: ->
|
|
20
|
+
'grid-template-areas: "' + @layout.join('" "') + '";' +
|
|
21
|
+
'grid-auto-columns: ' +
|
|
22
|
+
Array(@layout[0].split(' ').length).fill('1fr').join(' ') + ';' +
|
|
23
|
+
'grid-auto-rows: ' +
|
|
24
|
+
Array(@layout.length).fill('1fr').join(' ') + ';'
|
|
25
|
+
|
|
26
|
+
|
|
16
27
|
render: ->
|
|
17
|
-
@$el.empty()
|
|
18
|
-
|
|
28
|
+
@$el.empty().attr('style', @_style())
|
|
29
|
+
|
|
30
|
+
for view, idx in @views
|
|
19
31
|
options = _.extend
|
|
20
32
|
model: @model
|
|
21
33
|
parentView: this
|
|
22
34
|
localePrefix: @localePrefix
|
|
35
|
+
attributes:
|
|
36
|
+
style: "grid-area: #{String.fromCharCode(97 + idx)}"
|
|
23
37
|
, view.options
|
|
24
38
|
view = @subviews[view.options.name] ?= new view.View(options)
|
|
25
39
|
@$el.append(view.render().el)
|
|
40
|
+
|
|
26
41
|
this
|
data/lib/ela/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ela
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Franz Kißig
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-03-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|