circle_speech_balloon 0.0.8 → 0.0.9

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.
@@ -36,6 +36,8 @@ $ ->
36
36
  if fn == ofn
37
37
  else
38
38
  bln.attr('src', fn)
39
+ balloon_trace = '#panel' + $(bln).attr('panel_id') + 'speech_balloon' + $(bln).attr('element_id') + 'balloon' + $(bln).attr('element_part_id')
40
+ $(balloon_trace + 'system_picture_id').val(sp_id)
39
41
 
40
42
  $('input').map ->
41
43
  if $(@).attr('element_type') and $(@).attr('element_type') == 'speech_balloon' and $(@).attr('column') == 'r'
@@ -1,9 +1,3 @@
1
- <script>
2
- <!--
3
- var circle_speech_balloon_settings = <%= raw balloon.parsed_settings.to_json -%>;
4
- // -->
5
- </script>
6
- <%= javascript_include_tag "circle_speech_balloon/application" %>
7
1
 
8
2
  <div class="field">
9
3
  <%= f.label :x %><br />
@@ -1,3 +1,3 @@
1
1
  module CircleSpeechBalloon
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -58,9 +58,10 @@ module CircleSpeechBalloon
58
58
 
59
59
  def select_system_picture
60
60
  tr = self.r % 360
61
- tr = 360 - tr if tr < 0
62
- br = (tr / self.r_step).to_i
63
- self.system_picture_id = self.parsed_settings[br.to_s]['balloon']['system_picture_id']
61
+ tr = 360 + tr if tr < 0
62
+ offset = self.r_step / 2.0
63
+ idx = (((tr + offset) % 360) / self.r_step).to_i
64
+ self.system_picture_id = self.parsed_settings[idx.to_s]['balloon']['system_picture_id']
64
65
  self.system_picture_id
65
66
  end
66
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circle_speech_balloon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: