File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 8
8
author_url 'https://github.com/georepublic'
9
9
url 'https://github.com/gtt-project/redmine_gtt'
10
10
description 'Adds location-based task management and maps'
11
- version '4.1.1 '
11
+ version '4.1.2 '
12
12
13
13
requires_redmine :version_or_higher => '4.2.0'
14
14
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ def ignore_small_geom_change
35
35
old_value = geom_change [ 0 ] . coordinates
36
36
new_value = geom_change [ 1 ] . coordinates
37
37
if old_value . instance_of? ( Array )
38
+ old_value = old_value . flatten
39
+ new_value = new_value . flatten
38
40
if old_value . length != new_value . length
39
41
return true
40
42
end
41
- old_value = old_value . flatten
42
- new_value = new_value . flatten
43
43
end
44
44
self . geom = geom_change [ 0 ] if new_value . zip ( old_value ) . map { |a , b | ( a -b ) . abs } . map { |x | x < 0.00000001 } . all?
45
45
end
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ class IssueTest < GttTest
123
123
assert_equal new_coordinates , @issue . geojson [ "geometry" ] [ "coordinates" ]
124
124
125
125
new_coordinates = [ old_coordinates [ 0 ] . map { |c | [ c [ 0 ] , c [ 1 ] ] } ]
126
- new_coordinates [ 0 ] . delete_at ( 1 )
126
+ new_coordinates [ 0 ] . insert ( 2 , [ 135.301041779 , 34.680969984 ] )
127
127
@issue . update_attribute :geojson , polygon_geojson ( new_coordinates )
128
128
@issue . instance_variable_set "@geojson" , nil
129
129
assert_equal new_coordinates , @issue . geojson [ "geometry" ] [ "coordinates" ]
You can’t perform that action at this time.
0 commit comments