|
From: <ma...@us...> - 2012-03-11 20:11:22
|
Revision: 727
http://openautomation.svn.sourceforge.net/openautomation/?rev=727&view=rev
Author: mayerch
Date: 2012-03-11 20:11:16 +0000 (Sun, 11 Mar 2012)
Log Message:
-----------
Better error handling
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2012-03-11 19:52:14 UTC (rev 726)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2012-03-11 20:11:16 UTC (rev 727)
@@ -1306,6 +1306,9 @@
{
floor = this.buildingProperties.floorNames[floor];
}
+ if( !(floor in this.buildingProperties.floor) )
+ return target; // early exit when floor is invalid
+
if( room ) // use room if defined
{
target.x = room.center.x;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|