You have a typo, it's SetMaxLimits
, not SetMaxlimits
, and you have to reference the object that the Data
method is a property of, which in this case could probably be done with this
, depending on how the function is called.
var Limits = {
minx: 0,
miny: 0,
SetMaxLimits: function (x1, x2, y1, y2, zoom) {
alert('j');
}
};
var Wind = {
Data : Limits,
Screen : Limits,
Rotation: 0,
CanvasW : 0,
CanvasH : 0,
North : true,
_Math : true,
NormalLimits: function () {
this.Data.SetMaxLimits(0, 0, 0, 0, 0);
}
};
Wind.NormalLimits();