//--------------------------------------------------------------
void ofxMSAInteractiveObject::_mouseReleased(ofMouseEventArgs &e) {
	int x = e.x;
	int y = e.y;
	int button = e.button;
    
    if(doCoordTransformation){
        ofVec2f transformedCoord = screenToCanvas(ofVec2f(x,y));
        x = transformedCoord.x;
        y = transformedCoord.y;
    }
	
	if(verbose) printf("ofxMSAInteractiveObject::_mouseReleased(x: %i, y: %i, button: %i)\n", x, y, button);
	if(!enabled) {
        _isMousePressed[button] = false;
        return;
    }
	
	if(hitTest(x, y)) {
		onRelease(x, y, button);
	} else {
		if(isMousePressed(button)) onReleaseOutside(x, y, button);
	}
	_isMousePressed[button] = false;

    _stateChangeTimestampMillis = ofGetElapsedTimeMillis();
    
    mouseReleased(x, y, button);
}
void ofxMSAInteractiveObject::_mouseReleased(ofMouseEventArgs &e) {
	int x = e.x;
	int y = e.y;
	int button = e.button;
	
	if(verbose) printf("ofxMSAInteractiveObject::_mouseReleased(x: %i, y: %i, button: %i)\n", x, y, button);
	if(!enabled) return;

	_mouseX = x;
	_mouseY = y;
	_mouseButton = button;
	
	if(hitTest(x, y)) {
		onRelease(x, y, button);
	} else {
		if(_mouseDown) onReleaseOutside(x, y, button);
	}
	_mouseDown = false;
}