class Crimson::BottomResizer

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/crimson/widgets/bottom_resizer.rb, line 7
def initialize
  super('ns-resize')

  style.width = '100%'
  style.height = '5px'
  style.position = 'absolute'
  style.bottom = 0
  style.left = 0
end

Public Instance Methods

on_mousemove(data) click to toggle source
# File lib/crimson/widgets/bottom_resizer.rb, line 17
def on_mousemove(data)
    parent.style.height = "#{data.clientY - parent.style.top.delete_suffix('px').to_i - data.movementY}px"
    parent.commit!
end