Sha256: 8c35eaf13693ec2be2fa54584e63ef2f514600e0a96c0febee1eb68c8bcdfe73

Contents?: true

Size: 455 Bytes

Versions: 6

Compression:

Stored size: 455 Bytes

Contents

def draggable_attributes(comp)
  draggable_attributes = ''
  if comp.draggable
    draggable_attributes = "draggable=true data-drag_params='#{comp.draggable.to_h.to_json}'"
  end
  draggable_attributes
end

def drop_zone_attributes(comp)
  drop_zone_attributes = ''
  if comp.drop_zone
    zone = comp.drop_zone[:zone]
    drop_zone_attributes = "data-dropzone='#{zone}' data-drop_params='#{comp.drop_zone.to_h.to_json}'"
  end
  drop_zone_attributes
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 views/mdc/components/drag_and_drop/drag_and_drop.rb
voom-presenters-2.1.0 views/mdc/components/drag_and_drop/drag_and_drop.rb
voom-presenters-2.0.3 views/mdc/components/drag_and_drop/drag_and_drop.rb
voom-presenters-2.0.2 views/mdc/components/drag_and_drop/drag_and_drop.rb
voom-presenters-2.0.1 views/mdc/components/drag_and_drop/drag_and_drop.rb
voom-presenters-2.0.0 views/mdc/components/drag_and_drop/drag_and_drop.rb