mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Fixed a few minor floor plan bugs
This commit is contained in:
parent
84734c04dc
commit
f81727880d
@ -531,21 +531,21 @@ beestat.component.floor_plan.prototype.update_infobox = function() {
|
|||||||
const parts = [];
|
const parts = [];
|
||||||
if (this.state_.active_room !== undefined) {
|
if (this.state_.active_room !== undefined) {
|
||||||
parts.push(this.state_.active_room.name || 'Unnamed Room');
|
parts.push(this.state_.active_room.name || 'Unnamed Room');
|
||||||
// parts.push(
|
parts.push(
|
||||||
// Math.abs(
|
Math.abs(
|
||||||
// Math.round(
|
Math.round(
|
||||||
// ClipperLib.Clipper.Area(this.state_.active_room.points) / 144
|
ClipperLib.Clipper.Area(this.state_.active_room.points) / 144
|
||||||
// )
|
)
|
||||||
// ).toLocaleString() + ' sqft'
|
).toLocaleString() + ' sqft'
|
||||||
// );
|
);
|
||||||
} else {
|
} else {
|
||||||
parts.push(this.state_.active_group.name || 'Unnamed Floor');
|
parts.push(this.state_.active_group.name || 'Unnamed Floor');
|
||||||
// let area = 0;
|
let area = 0;
|
||||||
// this.state_.active_group.rooms.forEach(function(room) {
|
this.state_.active_group.rooms.forEach(function(room) {
|
||||||
// area += Math.abs(ClipperLib.Clipper.Area(room.points));
|
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(' • '));
|
this.infobox_container_.innerText(parts.join(' • '));
|
||||||
};
|
};
|
||||||
|
@ -73,6 +73,7 @@ beestat.component.floor_plan_entity.prototype.decorate_polygon_ = function(paren
|
|||||||
});
|
});
|
||||||
this.polygon_.addEventListener('mouseup', function(e) {
|
this.polygon_.addEventListener('mouseup', function(e) {
|
||||||
if (
|
if (
|
||||||
|
self.mousedown_mouse_ !== undefined &&
|
||||||
e.clientX === self.mousedown_mouse_.x &&
|
e.clientX === self.mousedown_mouse_.x &&
|
||||||
e.clientY === self.mousedown_mouse_.y
|
e.clientY === self.mousedown_mouse_.y
|
||||||
) {
|
) {
|
||||||
|
@ -103,7 +103,6 @@ beestat.component.input.select.prototype.add_option = function(option) {
|
|||||||
* @return {beestat.component.input.select} This.
|
* @return {beestat.component.input.select} This.
|
||||||
*/
|
*/
|
||||||
beestat.component.input.select.prototype.set_value = function(value) {
|
beestat.component.input.select.prototype.set_value = function(value) {
|
||||||
console.log('set select value to ' + value);
|
|
||||||
this.input_.value = value;
|
this.input_.value = value;
|
||||||
|
|
||||||
this.dispatchEvent('change');
|
this.dispatchEvent('change');
|
||||||
|
@ -15,7 +15,7 @@ if($setting->get('environment') === 'dev' || $setting->get('environment') === 'd
|
|||||||
echo '<script src="/js/lib/highcharts/highcharts.js"></script>' . PHP_EOL;
|
echo '<script src="/js/lib/highcharts/highcharts.js"></script>' . PHP_EOL;
|
||||||
echo '<script src="/js/lib/threejs/threejs.js"></script>' . PHP_EOL;
|
echo '<script src="/js/lib/threejs/threejs.js"></script>' . PHP_EOL;
|
||||||
echo '<script src="/js/lib/suncalc/suncalc.js"></script>' . PHP_EOL;
|
echo '<script src="/js/lib/suncalc/suncalc.js"></script>' . PHP_EOL;
|
||||||
// echo '<script src="/js/lib/clipper/clipper.js"></script>' . PHP_EOL;
|
echo '<script src="/js/lib/clipper/clipper.js"></script>' . PHP_EOL;
|
||||||
|
|
||||||
// Beestat
|
// Beestat
|
||||||
echo '<script src="/js/beestat.js"></script>' . PHP_EOL;
|
echo '<script src="/js/beestat.js"></script>' . PHP_EOL;
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
* http://www-cs-students.stanford.edu/~tjw/jsbn/LICENSE *
|
* 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)&&
|
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<<a.DB-15)-1;this.mt2=2*a.t}function U(a,b){return a&b}function H(a,b){return a|b}function N(a,b){return a^b}function O(a,b){return a&~b}function D(){}function P(a){return a}function C(a){this.r2=q();this.q3=q();k.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}var d={version:"6.4.2.2",use_lines:!0,use_xyz:!1},G=!1;"undefined"!==
|
(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<<a.DB-15)-1;this.mt2=2*a.t}function U(a,b){return a&b}function H(a,b){return a|b}function N(a,b){return a^b}function O(a,b){return a&~b}function D(){}function P(a){return a}function C(a){this.r2=q();this.q3=q();k.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}var d={version:"6.4.2.2",use_lines:!0,use_xyz:!1},G=!1;"undefined"!==
|
||||||
typeof module&&module.exports?(module.exports=d,G=!0):"undefined"!==typeof document?window.ClipperLib=d:self.ClipperLib=d;if(G){var u="chrome";var v="Netscape"}else u=navigator.userAgent.toString().toLowerCase(),v=navigator.appName;var I=-1!=u.indexOf("chrome")&&-1==u.indexOf("chromium")?1:0;G=-1!=u.indexOf("chromium")?1:0;var Q=-1!=u.indexOf("safari")&&-1==u.indexOf("chrome")&&-1==u.indexOf("chromium")?1:0;var J=-1!=u.indexOf("firefox")?1:0;u.indexOf("firefox/17");u.indexOf("firefox/15");u.indexOf("firefox/3");
|
typeof module&&module.exports?(module.exports=d,G=!0):"undefined"!==typeof document?window.ClipperLib=d:self.ClipperLib=d;if(G){var u="chrome";var v="Netscape"}else u=navigator.userAgent.toString().toLowerCase(),v=navigator.appName;var I=-1!=u.indexOf("chrome")&&-1==u.indexOf("chromium")?1:0;G=-1!=u.indexOf("chromium")?1:0;var Q=-1!=u.indexOf("safari")&&-1==u.indexOf("chrome")&&-1==u.indexOf("chromium")?1:0;var J=-1!=u.indexOf("firefox")?1:0;u.indexOf("firefox/17");u.indexOf("firefox/15");u.indexOf("firefox/3");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user