labimotion 2.0.0.rc4 → 2.0.0.rc6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aab9882de072c222a6e67a54d30eabe5f81733531e36cf702fcf3383cc526981
4
- data.tar.gz: a84933a64d143182e581afd1c69ae8bee6dec8ce462c6eec9fa90b48da64df2a
3
+ metadata.gz: b55a7bdf8c25fd127bd7a7bab35676d74e3f3523cb55e03516cc28d3e2df738c
4
+ data.tar.gz: a28bad0092a10adc3befb26c3803d5f969d40bf9e387a7015890c2f81cd3089e
5
5
  SHA512:
6
- metadata.gz: 59430594a0b79bf838688ffd2f3f71e928e582ee9b44f11a3dbf5cdbc0ba30e2d971dc25e2b538027357a06a04d2f61d05dfbc0a151f41e65de580633d238db6
7
- data.tar.gz: 895e4a24ab94b5b92a2fbcafdfeb90cc1ee040d75c7fbe8b142de08293b8c503f9551f64865ee3a2980811f8344dabc7159f43992c972c80ff455661c70bfd7d
6
+ metadata.gz: 94b3f84c3b2588b08f19c66bafdd17fb9eef3674040bd3dc0683132a4b5709c11f643e81afda2109741da24e4a38c6b407c4eff279c00c9292ef0942611c4ec8
7
+ data.tar.gz: 19082b803643920e698b9f14c1ce89b68aac5121a5adeab473d86c16c7129ba1d9e024e1bcec83b7c802ed79409183e1129967881295b66c363912652d563191
@@ -64,9 +64,10 @@ module Labimotion
64
64
  return unless el.present? && object.properties.dig(Labimotion::Prop::LAYERS, key, Labimotion::Prop::FIELDS, idx,
65
65
  'value').present?
66
66
 
67
+ label = field['type'] == Labimotion::FieldType::DRAG_SAMPLE ? el&.short_label : el.iupac_name
67
68
  update_field_value(key, idx, {
68
- 'el_label' => el&.short_label,
69
- 'el_tip' => el&.short_label,
69
+ 'el_label' => label,
70
+ 'el_tip' => label,
70
71
  'el_svg' => if field['type'] == Labimotion::FieldType::DRAG_SAMPLE
71
72
  el&.get_svg_path
72
73
  else
@@ -58,6 +58,9 @@ module Labimotion
58
58
  after_create :update_counter
59
59
  before_destroy :delete_attachment
60
60
 
61
+ def user_labels
62
+ tag&.taggable_data&.fetch('user_labels', nil)
63
+ end
61
64
 
62
65
  def attachments
63
66
  Attachment.where(attachable_id: self.id, attachable_type: self.class.name)
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '2.0.0.rc4'
5
+ VERSION = '2.0.0.rc6'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labimotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc4
4
+ version: 2.0.0.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chia-Lin Lin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-02-20 00:00:00.000000000 Z
12
+ date: 2025-02-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails