biojs-vis-pdbviewer
Version:
A BioJS 2.0 component to view protein structures
13 lines (12 loc) • 360 B
JavaScript
Clazz.declarePackage ("JU");
c$ = Clazz.decorateAsClass (function () {
this.x = 0;
this.y = 0;
this.width = 0;
this.height = 0;
Clazz.instantialize (this, arguments);
}, JU, "Rectangle");
Clazz.defineMethod (c$, "contains",
function (X, Y) {
return (X >= this.x && Y >= this.y && X - this.x < this.width && Y - this.y < this.height);
}, "~N,~N");