Sha256: 2d59eec083b3437fcd4e8c1f370fdee18ea6d7e407c2cb5e24f67fb749bc0849

Contents?: true

Size: 1.03 KB

Versions: 11

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

# for browser rendering

module BrowserHelper
  def self.browser_drag_move(params, atome_id, atome, proc)
    atome.drag_move_proc = proc
    atome_js.JS.drag(params, atome_id, atome)
  end

  def self.browser_drag_lock(params, atome_id, atome, _proc)
    atome_js.JS.lock(params, atome_id, atome)
  end

  def self.browser_drag_remove(params, atome_id, atome, _proc)
    params = params != true
    atome_js.JS.remove(params, atome_id, atome)
  end

  def self.browser_drag_snap(params, atome_id, atome, _proc)
    atome_js.JS.snap(params.to_n, atome_id, atome)
  end

  def self.browser_drag_inertia(params, atome_id, atome, _proc)
    atome_js.JS.inertia(params, atome_id, atome)
  end

  def self.browser_drag_constraint(params, atome_id, atome, _proc)
    atome_js.JS.constraint(params.to_n, atome_id, atome)
  end

  def self.browser_drag_start(_params, _atome_id, atome, proc)
    atome.drag_start_proc = proc
  end

  def self.browser_drag_end(_params, _atome_id, atome, proc)
    atome.drag_end_proc = proc
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
atome-0.5.3.8.8 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.8.1 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.8.0 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.7.8 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.7.3 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.7.2 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.4 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.3.2 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.2.8 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.2.7 lib/atome/renderers/browser/helpers/drag_helper.rb
atome-0.5.2.5 lib/atome/renderers/browser/helpers/drag_helper.rb