Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Latest commit

 

History

History
19 lines (15 loc) · 442 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 442 Bytes

Spine.Watch

Events for property changes.

var Model = Spine.Model.dup();
Model.configure("Model", "prop1", "prop2");

Model.bind("update[prop1]", function(record,prop,value) {
	// record: the record the property is on
	// prop: the name of the property
	// value: the new value
});

var obj = Model.create();
obj.bind("update[prop1]", function(record,prop,value) {
	// Same as previous but only fires for that record
});