Open DanRathbun opened 1 year ago
Perhaps simplify nested iteration in AnnotationEraserTool#erase_annotation_at()
AnnotationEraserTool#erase_annotation_at()
https://github.com/SketchUp/sketchup-annotations/blob/main/src/su_annotations/tools/annotation_eraser.rb erase_annotation_at(), line 197, is a somewhat confusing nested iteration ...
erase_annotation_at()
indicies = {} @curves.each { |type, curves| indicies[type] = [] curves.each { |data| indicies[type] << data[:index] } }
... which might be simplified to ...
indicies = @curves.map { |type, curves| [ type, curves.map { |data| data[:index] } ] }
Perhaps simplify nested iteration in
AnnotationEraserTool#erase_annotation_at()
https://github.com/SketchUp/sketchup-annotations/blob/main/src/su_annotations/tools/annotation_eraser.rb
erase_annotation_at()
, line 197, is a somewhat confusing nested iteration ...... which might be simplified to ...