opal-jquery icon indicating copy to clipboard operation
opal-jquery copied to clipboard

.offset could not be set

Open atomecorp opened this issue 5 years ago • 0 comments

There's no way to set offset to an element. here is a patch to make it work

class Element def offset value = nil if value.nil? Native(self.offset()) else left = value[:left].to_f top = value[:top].to_f Native(self.offset({left: #{left}, top: #{top}})) end end end

atomecorp avatar May 14 '20 13:05 atomecorp