## from senecaII
# throttle, feather and condition with mouse
var MouseHandler = {
	new : func() {
		var obj = { parents : [ MouseHandler ] };

		obj.property = nil;
		obj.factor = 1.0;

		obj.YListenerId = setlistener( "devices/status/mice/mouse/accel-y", 
		func(n) { obj.YListener(n); }, 1, 0 );

		return obj;
	},

	YListener : func(n) {
		me.property == nil and return;
		me.factor == 0 and return;
		n == nil and return;
		var v = n.getValue();
		v == nil and return;
		fgcommand("property-adjust", props.Node.new({ 
			"offset" : v,
			"factor" : me.factor,
			"property" : me.property
		}));
	},

	set : func( property = nil, factor = 1.0 ) {
		me.property = property;
		me.factor = factor;
	},

};

var mouseHandler = MouseHandler.new();