'Convert position to value'

def position_to_value(self, y, slider=False):

    offset = (0 if slider else 1)
    vsb = self.editor.verticalScrollBar()
    return (vsb.minimum() + max([0, ((y - offset) / self.get_scale_factor(slider))]))
