flammarion 0.1.7pre → 0.1.7pre2
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.
- data/Readme.md +2 -0
- data/lib/flammarion/version.rb +1 -1
- data/lib/flammarion/writeable.rb +8 -20
- data/lib/html/build/javascripts/actions.js +1 -1
- data/lib/html/build/javascripts/all.js +4 -1
- data/lib/html/build/javascripts/input.js +1 -1
- data/lib/html/build/javascripts/map.js +1 -1
- data/lib/html/build/javascripts/plot.js +3 -0
- data/lib/html/build/javascripts/websocket.js +1 -1
- data/lib/html/build/stylesheets/all.css +1 -1
- data/lib/html/build/stylesheets/plot.css +1 -1
- data/lib/html/source/javascripts/plot.coffee +3 -0
- data/lib/html/source/javascripts/websocket.coffee +1 -1
- data/lib/html/source/stylesheets/plot.styl +1 -1
- metadata +2 -2
data/Readme.md
CHANGED
data/lib/flammarion/version.rb
CHANGED
data/lib/flammarion/writeable.rb
CHANGED
|
@@ -50,12 +50,13 @@ module Flammarion
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def plot(data, options = {})
|
|
53
|
-
|
|
54
|
-
data = {y:data, x:(1..data.size).to_a}
|
|
55
|
-
else
|
|
53
|
+
if data.respond_to?(:keys)
|
|
56
54
|
options = options.merge(data)
|
|
55
|
+
data = [data]
|
|
56
|
+
elsif not data.first.respond_to?(:keys)
|
|
57
|
+
data = [{y:data, x:(1..data.size).to_a}.merge(options)]
|
|
57
58
|
end
|
|
58
|
-
@engraving.send_json({action:'plot', id:@id, target:@target, data:
|
|
59
|
+
@engraving.send_json({action:'plot', id:@id, target:@target, data:data}.merge(options))
|
|
59
60
|
end
|
|
60
61
|
end
|
|
61
62
|
|
|
@@ -124,24 +125,11 @@ module Flammarion
|
|
|
124
125
|
end
|
|
125
126
|
|
|
126
127
|
# Creates a new plot to display single axis data
|
|
127
|
-
# @param [Array<Number>] values A list of numbers to plot
|
|
128
128
|
# @macro add_options
|
|
129
|
-
# @option options [Integer] :number_of_ticks The number of tick marks to
|
|
130
|
-
# display across the bottom
|
|
131
|
-
# @option options [Integer] :tick_precision The number of digits after the
|
|
132
|
-
# decimal point to display next to the tick marks
|
|
133
|
-
# @option options [Float] :xstart (0.0) The starting value for the x-axis
|
|
134
|
-
# @option options [Float, String] :ystart ('min') The starting value for the
|
|
135
|
-
# y-axis. Can be 'min' to start at the minimum value.
|
|
136
|
-
# @option options [Boolean] :draw_zero (true) draw a line through y = 0
|
|
137
|
-
# @option options [Boolean] :draw_mark (false) place a + at each point on
|
|
138
|
-
# the line.
|
|
139
|
-
# @option options [Boolean] :draw_line (true) draw a line through all the
|
|
140
|
-
# points.
|
|
141
|
-
# @option options [Boolean] :fill (false) fill in the area between the curve
|
|
142
|
-
# and zero
|
|
143
|
-
# @note You can press 'a' while hovering the plot to reset the zoom.
|
|
144
129
|
# @return [Plot] A Plot object for manipulation after creation.
|
|
130
|
+
# @overload plot(array, options)
|
|
131
|
+
# @param [Array<Number>] values A list of numbers to plot
|
|
132
|
+
# @overload plot(dataset, options)
|
|
145
133
|
def plot(data, options = {})
|
|
146
134
|
id = @engraving.make_id
|
|
147
135
|
p = Plot.new(id, @pane_name, @engraving)
|
|
@@ -197,7 +197,7 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
emojione.imagePathPNG = '
|
|
200
|
+
emojione.imagePathPNG = 'images/emoji/';
|
|
201
201
|
if (options.escape_icons) {
|
|
202
202
|
text = emojione.toImage(text);
|
|
203
203
|
}
|
|
@@ -6863,7 +6863,7 @@ window.font_awesome_list = ["glass","music","search","envelope-o","heart","star"
|
|
|
6863
6863
|
}
|
|
6864
6864
|
});
|
|
6865
6865
|
}
|
|
6866
|
-
emojione.imagePathPNG = '
|
|
6866
|
+
emojione.imagePathPNG = 'images/emoji/';
|
|
6867
6867
|
if (options.escape_icons) {
|
|
6868
6868
|
text = emojione.toImage(text);
|
|
6869
6869
|
}
|
|
@@ -7402,6 +7402,9 @@ window.font_awesome_list = ["glass","music","search","envelope-o","heart","star"
|
|
|
7402
7402
|
return Plotly.newPlot(plotDiv[0], data.data, $.extend({
|
|
7403
7403
|
width: plotDiv.width()
|
|
7404
7404
|
}, window.default_plot_options, data));
|
|
7405
|
+
} else {
|
|
7406
|
+
plotDiv[0].data = data.data;
|
|
7407
|
+
return Plotly.redraw(plotDiv[0]);
|
|
7405
7408
|
}
|
|
7406
7409
|
}
|
|
7407
7410
|
});
|
|
@@ -197,7 +197,7 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
emojione.imagePathPNG = '
|
|
200
|
+
emojione.imagePathPNG = 'images/emoji/';
|
|
201
201
|
if (options.escape_icons) {
|
|
202
202
|
text = emojione.toImage(text);
|
|
203
203
|
}
|
|
@@ -197,7 +197,7 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
emojione.imagePathPNG = '
|
|
200
|
+
emojione.imagePathPNG = 'images/emoji/';
|
|
201
201
|
if (options.escape_icons) {
|
|
202
202
|
text = emojione.toImage(text);
|
|
203
203
|
}
|
|
@@ -197,7 +197,7 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
emojione.imagePathPNG = '
|
|
200
|
+
emojione.imagePathPNG = 'images/emoji/';
|
|
201
201
|
if (options.escape_icons) {
|
|
202
202
|
text = emojione.toImage(text);
|
|
203
203
|
}
|
|
@@ -31,3 +31,6 @@ $.extend WSClient.prototype.actions,
|
|
|
31
31
|
@__parent.add(plotDiv, target, data)
|
|
32
32
|
console.log(default_plot_options)
|
|
33
33
|
Plotly.newPlot(plotDiv[0], data.data, $.extend(width: plotDiv.width(), window.default_plot_options, data))
|
|
34
|
+
else
|
|
35
|
+
plotDiv[0].data = data.data
|
|
36
|
+
Plotly.redraw(plotDiv[0])
|
|
@@ -80,7 +80,7 @@ class WSClient
|
|
|
80
80
|
if options.escape_icons
|
|
81
81
|
text = text.replace /:[\w-]+:/g, (match) ->
|
|
82
82
|
if font_awesome_list.includes(match[1..-2]) then "<i class='fa fa-#{match[1..-2]}'></i>" else match
|
|
83
|
-
emojione.imagePathPNG = '
|
|
83
|
+
emojione.imagePathPNG = 'images/emoji/'
|
|
84
84
|
text = emojione.toImage(text) if options.escape_icons
|
|
85
85
|
text = $("<div>#{text}</div>")
|
|
86
86
|
text.find("a[href^='http']").attr('target','_blank')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flammarion
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7pre2
|
|
5
5
|
prerelease: 5
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-05-
|
|
12
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rubame
|