Sha256: 790a3ea5306285fc6988b4c7a92f8e713c4a60f9c8c29fe0cb6cf4d9d18c1a9a

Contents?: true

Size: 592 Bytes

Versions: 12

Compression:

Stored size: 592 Bytes

Contents

module Coprl::Presenters::WebClient::Helpers
  module DragAndDrop
    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
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.5 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.4 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.3 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.2 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb
coprl-3.0.0.beta.1 lib/coprl/presenters/web_client/helpers/drag_and_drop.rb