circle_speech_balloon 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -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'
|
@@ -58,9 +58,10 @@ module CircleSpeechBalloon
|
|
58
58
|
|
59
59
|
def select_system_picture
|
60
60
|
tr = self.r % 360
|
61
|
-
tr = 360
|
62
|
-
|
63
|
-
|
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
|
|