mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 05:02:34 +00:00
Sync
This commit is contained in:
@@ -586,11 +586,13 @@ module CyberarmEngine
|
|||||||
element.children.find { |child| child.child_of?(element) if child.is_a?(Container) }
|
element.children.find { |child| child.child_of?(element) if child.is_a?(Container) }
|
||||||
end
|
end
|
||||||
|
|
||||||
# def parent_of?(element)
|
def parent_of?(element)
|
||||||
# return true if element.children.find { |child| child == self }
|
return false if element == self
|
||||||
|
return false unless is_a?(Container)
|
||||||
|
return true if @children.find { |child| child == element }
|
||||||
|
|
||||||
# element.children.find { |child| child.parent}
|
@children.find { |child| child.parent_of?(element) if child.is_a?(Container) }
|
||||||
# end
|
end
|
||||||
|
|
||||||
def focus(_)
|
def focus(_)
|
||||||
warn "#{self.class}#focus was not overridden!"
|
warn "#{self.class}#focus was not overridden!"
|
||||||
|
|||||||
Reference in New Issue
Block a user