diff --git a/js/component/floor_plan.js b/js/component/floor_plan.js index 0348cce..c0f92bc 100644 --- a/js/component/floor_plan.js +++ b/js/component/floor_plan.js @@ -531,21 +531,21 @@ beestat.component.floor_plan.prototype.update_infobox = function() { const parts = []; if (this.state_.active_room !== undefined) { parts.push(this.state_.active_room.name || 'Unnamed Room'); - // parts.push( - // Math.abs( - // Math.round( - // ClipperLib.Clipper.Area(this.state_.active_room.points) / 144 - // ) - // ).toLocaleString() + ' sqft' - // ); + parts.push( + Math.abs( + Math.round( + ClipperLib.Clipper.Area(this.state_.active_room.points) / 144 + ) + ).toLocaleString() + ' sqft' + ); } else { parts.push(this.state_.active_group.name || 'Unnamed Floor'); - // let area = 0; - // this.state_.active_group.rooms.forEach(function(room) { - // area += Math.abs(ClipperLib.Clipper.Area(room.points)); - // }); + let area = 0; + this.state_.active_group.rooms.forEach(function(room) { + area += Math.abs(ClipperLib.Clipper.Area(room.points)); + }); - // parts.push(Math.round(area / 144).toLocaleString() + ' sqft'); + parts.push(Math.round(area / 144).toLocaleString() + ' sqft'); } this.infobox_container_.innerText(parts.join(' • ')); }; diff --git a/js/component/floor_plan_entity/room.js b/js/component/floor_plan_entity/room.js index 6e20279..2112071 100644 --- a/js/component/floor_plan_entity/room.js +++ b/js/component/floor_plan_entity/room.js @@ -73,6 +73,7 @@ beestat.component.floor_plan_entity.prototype.decorate_polygon_ = function(paren }); this.polygon_.addEventListener('mouseup', function(e) { if ( + self.mousedown_mouse_ !== undefined && e.clientX === self.mousedown_mouse_.x && e.clientY === self.mousedown_mouse_.y ) { diff --git a/js/component/input/select.js b/js/component/input/select.js index d89c00b..cc54833 100644 --- a/js/component/input/select.js +++ b/js/component/input/select.js @@ -103,7 +103,6 @@ beestat.component.input.select.prototype.add_option = function(option) { * @return {beestat.component.input.select} This. */ beestat.component.input.select.prototype.set_value = function(value) { - console.log('set select value to ' + value); this.input_.value = value; this.dispatchEvent('change'); diff --git a/js/js.php b/js/js.php index 7d978fc..2ae255c 100755 --- a/js/js.php +++ b/js/js.php @@ -15,7 +15,7 @@ if($setting->get('environment') === 'dev' || $setting->get('environment') === 'd echo '' . PHP_EOL; echo '' . PHP_EOL; echo '' . PHP_EOL; - // echo '' . PHP_EOL; + echo '' . PHP_EOL; // Beestat echo '' . PHP_EOL; diff --git a/js/lib/clipper/clipper.js b/js/lib/clipper/clipper.js index a0ad3ee..96c3b60 100644 --- a/js/lib/clipper/clipper.js +++ b/js/lib/clipper/clipper.js @@ -65,7 +65,7 @@ * http://www-cs-students.stanford.edu/~tjw/jsbn/LICENSE * * * *******************************************************************************/ -(function(){function k(a,b,c){d.biginteger_used=1;null!=a&&("number"==typeof a&&"undefined"==typeof b?this.fromInt(a):"number"==typeof a?this.fromNumber(a,b,c):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function q(){return new k(null,void 0,void 0)}function R(a,b,c,e,d,g){for(;0<=--g;){var f=b*this[a++]+c[e]+d;d=Math.floor(f/67108864);c[e++]=f&67108863}return d}function S(a,b,c,e,d,g){var f=b&32767;for(b>>=15;0<=--g;){var m=this[a]&32767,k=this[a++]>>15,n=b*m+k*f;m=f* +!(function(){function k(a,b,c){d.biginteger_used=1;null!=a&&("number"==typeof a&&"undefined"==typeof b?this.fromInt(a):"number"==typeof a?this.fromNumber(a,b,c):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function q(){return new k(null,void 0,void 0)}function R(a,b,c,e,d,g){for(;0<=--g;){var f=b*this[a++]+c[e]+d;d=Math.floor(f/67108864);c[e++]=f&67108863}return d}function S(a,b,c,e,d,g){var f=b&32767;for(b>>=15;0<=--g;){var m=this[a]&32767,k=this[a++]>>15,n=b*m+k*f;m=f* m+((n&32767)<<15)+c[e]+(d&1073741823);d=(m>>>30)+(n>>>15)+b*k+(d>>>30);c[e++]=m&1073741823}return d}function T(a,b,c,e,d,g){var f=b&16383;for(b>>=14;0<=--g;){var m=this[a]&16383,k=this[a++]>>14,n=b*m+k*f;m=f*m+((n&16383)<<14)+c[e]+d;d=(m>>28)+(n>>14)+b*k;c[e++]=m&268435455}return d}function M(a,b){var c=E[a.charCodeAt(b)];return null==c?-1:c}function y(a){var b=q();b.fromInt(a);return b}function F(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&& (a=c,b+=2);0!=a>>1&&(b+=1);return b}function z(a){this.m=a}function B(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<