def onShowImpl(self, popup):
        width = self.getOffsetWidth()
        heigth = self.getOffsetHeight()
        w_width = Window.getClientWidth()
        w_heigth = Window.getClientHeight()
        if w_width > width and w_heigth > heigth:
            offset_x = self.getAbsoluteLeft()
            offset_y = self.getAbsoluteTop()
            element = self.getElement()
            if w_width > (offset_x + width):
                offset_x = w_width - width
                DOM.setStyleAttribute(element, "left", "%dpx" % offset_x)
            if (offset_y + heigth) > w_heigth:
                offset_y = w_heigth - heigth
                DOM.setStyleAttribute(element, "top", "%dpx" % offset_y)
dataset/ETHPy150Open pyjs/pyjs/pyjswidgets/pyjamas/ui/Tooltip.py/Tooltip.onShowImpl/swapped operands of `>`