import { i, r, x } from './query-assigned-elements-fea1f631.js';
|
import { e } from './custom-element-30fc6381.js';
|
import { n, B as BaseElement } from './base.component-813fc7cf.js';
|
import { i as i$1 } from './query-1c86d710.js';
|
import { InputComponent } from './input.component.js';
|
import '@dh-software/furnview-icons';
|
import './base-input.js';
|
|
var css_248z = i`.close-symbol{cursor:pointer;height:100%;position:relative;width:100%}.close-symbol.loading{z-index:999}.close-symbol.loading:after,.close-symbol.loading:before{background:#fff}.close-symbol:after,.close-symbol:before{background:var(--close-symbol-background,#888);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;margin:0;padding:0;position:absolute;top:50%;width:100%}.close-symbol:after:hover,.close-symbol:before:hover{background:var(--close-symbol-background-hover,#333)}.close-symbol:after{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg)}.close-symbol:before{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}:host(.active) .circle-number-symbol{border:var(--circle-number-symbol-border-active,2px solid #000)}.circle-number-symbol{align-items:center;background:var(--circle-number-symbol-background,var(--primary-color,red));border:var(--circle-number-symbol-border,2px solid #fff);border-radius:50%;box-shadow:var(--circle-number-symbol-box-shadow,1px 2px 5px 0 #000);color:var(--circle-number-symbol-color,var(--primary-text-color,#000));display:flex;height:var(--circle-number-symbol-size,30px);justify-content:center;position:relative;width:var(--circle-number-symbol-size,30px)}.custom-symbol{cursor:pointer;display:flex;left:10px;position:relative}.custom-symbol.up:after{background-image:var(--custom-symbol-image-down,url("/webui/images/minus.svg"));content:"";height:18px}.custom-symbol.down:after{background-image:var(--custom-symbol-image-down,url("/webui/images/plus.svg"));content:"";height:18px}.custom-symbol:after{color:#1e1e1e;margin:auto 0;padding:0 0 2px;pointer-events:none;transform:translateX(-15px);width:18px}.accordion-symbol{cursor:pointer;display:flex;left:10px;position:relative}.accordion-symbol.up:after{content:"-";font-size:xx-large;transform:scaleX(2) translateX(-4px)}.accordion-symbol.down:after{content:"+";font-size:xx-large}.accordion-symbol:after{color:#1e1e1e;margin:auto 0;padding:0 0 2px;pointer-events:none;transform:translateX(-15px);width:18px}.chevron-symbol{cursor:pointer;left:10px;position:relative}.chevron-symbol.up:after{content:"<"}.chevron-symbol.down:after{content:">"}.chevron-symbol:after{color:inherit;font:17px Consolas,monospace;padding:0 0 2px;pointer-events:none;position:absolute;-webkit-transform:rotate(90deg) translateX(-100%);-moz-transform:rotate(90deg) translateX(-100%);-ms-transform:rotate(90deg) translateX(-100%);transform:rotate(90deg) translateX(-100%)}@media (width >= 980px){.only-mobile{display:none!important}}@media (width <= 980px){.only-desktop{display:none!important}}.bold{font-weight:var(--global-font-weight-bold,600)}*{font-family:var(--global-font,Roboto);font-weight:var(--global-font-weight,400);-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container{display:flex;margin:10px 0}.container.column{flex-direction:column}.container.column.reverse{flex-direction:column-reverse}.container.row{flex-direction:row}.container.row.reverse{flex-direction:row-reverse}.fluid{flex:1}.fluid.space-after{margin-right:55px}.hidden{display:none!important}.mobile-mode-hide,:host(.mobile-mode-hide){display:none!important}.invisible{visibility:hidden!important}.invisible-scroll,:host(.invisible-scroll){margin-right:-22px;overflow:hidden}.invisible-scroll>:first-child,:host(.invisible-scroll)>:first-child{box-sizing:content-box;overflow-x:hidden;overflow-y:scroll;padding-right:22px}.invisible-scroll.bottom,:host(.invisible-scroll.bottom){margin-right:unset;overflow:hidden}.invisible-scroll.bottom>:first-child,:host(.invisible-scroll.bottom)>:first-child{box-sizing:content-box;margin-bottom:-22px;overflow-x:scroll;overflow-y:hidden;padding-bottom:22px;padding-right:unset}:host([disabled]){filter:contrast(.5) grayscale(1);pointer-events:none}*{scrollbar-color:#5c5c5c hsla(0,0%,100%,.004);scrollbar-width:thin}[disabled]{filter:contrast(.5) grayscale(1);pointer-events:none}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar,::-webkit-scrollbar-corner{background:hsla(0,0%,100%,0)}::-webkit-scrollbar-thumb{background:#5c5c5c;-webkit-border-radius:8px}::-webkit-scrollbar-button,::-webkit-scrollbar-button:horizontal:end:decrement,::-webkit-scrollbar-button:horizontal:end:increment,::-webkit-scrollbar-button:vertical:end:decrement,::-webkit-scrollbar-button:vertical:start:increment{background-color:transparent;border:none;color:transparent}:host{display:block;margin:var(--slider-margin,10px);width:var(--slider-dimension,unset)}:host .sliderValues{display:flex;flex-direction:row;justify-content:space-between;margin-top:15px}:host .slider{align-items:center;background:var(--slider-color,#ccc);border-radius:calc(var(--slider-size, 4px)/2);display:flex;height:var(--slider-size,4px);position:relative;width:100%}:host .slider .slider-line{height:var(--slider-size,4px);width:100%}:host .slider .range-between{background:var(--slider-color,#ccc);height:3.5px;left:calc(var(--slider-ellipse-size, 20px)/2*-1);position:absolute;right:calc(var(--slider-ellipse-size, 20px)/2*-1);z-index:1}:host .slider .max-slider,:host .slider .min-slider{border-radius:50%;height:var(--slider-ellipse-size,20px);position:absolute;touch-action:none;transform:translateX(-50%);width:var(--slider-ellipse-size,20px);z-index:2}:host .slider .min-slider{background:var(--slider-ellipse-color,#3bd);left:calc(var(--slider-ellipse-size, 20px)/2*-1)}:host .slider .max-slider{background:var(--slider-ellipse-color,#3bd);left:calc(100% - var(--slider-ellipse-size, 20px)/2)}:host(.vertical){height:var(--slider-dimension,unset)}:host(.vertical) .sliderValues{display:flex;flex-direction:column;justify-content:space-between;margin-top:10px}:host(.vertical) .slider{height:100%;width:var(--slider-size,4px)}:host(.vertical) .slider .range-between{bottom:calc(var(--slider-ellipse-size, 20px)/2*-1);height:unset;left:unset;right:unset;top:calc(var(--slider-ellipse-size, 20px)/2*-1);width:3.5px}:host(.vertical) .slider .min-slider{background:var(--slider-ellipse-color,#3bd);left:unset;top:calc(var(--slider-ellipse-size, 20px)/2*-1)}:host(.vertical) .slider .max-slider{background:var(--slider-ellipse-color,#3bd);left:unset;top:calc(100% - var(--slider-ellipse-size, 20px)/2)}:host(.fixed) .slider .max-slider,:host(.fixed) .slider .min-slider{pointer-events:none}`;
|
|
var __defProp = Object.defineProperty;
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
var __getProtoOf = Object.getPrototypeOf;
|
var __reflectGet = Reflect.get;
|
var __decorateClass = (decorators, target, key, kind) => {
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
if (decorator = decorators[i])
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
if (kind && result)
|
__defProp(target, key, result);
|
return result;
|
};
|
var __superStaticGet = (obj, member) => __reflectGet(__getProtoOf(obj), member, obj);
|
let SliderComponent = class extends BaseElement {
|
constructor() {
|
super();
|
this._formatDisplayValueFunction = (value) => {
|
return value.toFixed(2);
|
};
|
this._currentActionElement = null;
|
this.handlePointerDown = (e, position) => {
|
document.body.style.touchAction = "none";
|
e.preventDefault();
|
if (this._currentActionElement) {
|
this._startPosition = { x: this._currentActionElement.offsetLeft, y: this._currentActionElement.offsetTop };
|
this._currentPosition = position;
|
}
|
};
|
this.handlePointerMove = (e) => {
|
if (!this._currentActionElement)
|
return;
|
const mousePosition = this.getPointerPosition(e);
|
e.preventDefault();
|
const position = {
|
x: this._startPosition.x + mousePosition.x - this._currentPosition.x,
|
y: this._startPosition.y + mousePosition.y - this._currentPosition.y
|
};
|
if (this._direction && this._direction === 1) {
|
this.handleVerticalMovement(position);
|
} else {
|
this.handleHorizontalMovement(position);
|
}
|
};
|
this.handlePointerClick = (e, mousePosition) => {
|
if (!this._currentActionElement)
|
return;
|
e.preventDefault();
|
const position = {
|
x: mousePosition.x - this.getBoundingClientRect().x,
|
y: mousePosition.y - this.getBoundingClientRect().y
|
};
|
if (this._direction && this._direction === 1) {
|
this.handleVerticalMovement(position);
|
} else {
|
this.handleHorizontalMovement(position);
|
}
|
};
|
this.handlePointerUp = () => {
|
var _a, _b;
|
if (this._currentActionElement) {
|
this._currentActionElement = null;
|
document.body.style.touchAction = "auto";
|
document.removeEventListener("pointermove", this.handlePointerMove, false);
|
document.removeEventListener("pointerup", this.handlePointerUp, false);
|
(_b = (_a = CommunicationInterfaceService.FurnviewWebViewer) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.removeEventListener("pointerup", this.globalPointerUp);
|
}
|
this.dispatchChange(true);
|
};
|
this.globalPointerUp = (event) => {
|
this.handlePointerUp();
|
};
|
this.inputRegex = /[0-9].,+/;
|
this._startPosition = { x: 0, y: 0 };
|
this._currentPosition = { x: 0, y: 0 };
|
this._minPosition = { x: -1, y: -1, height: 0, width: 0 };
|
this._maxPosition = { x: -1, y: -1, height: 0, width: 0 };
|
}
|
set FormatDisplayValueFunction(value) {
|
this._formatDisplayValueFunction = value;
|
}
|
updated(_changedProperties) {
|
if (!this._value) {
|
this._value = this._range;
|
}
|
if (typeof this._value === "number") {
|
this.updateDisplayValues({ min: this._value, max: this._value });
|
} else {
|
this.updateDisplayValues(this._value);
|
}
|
super.updated(_changedProperties);
|
}
|
firstUpdated(_changedProperties) {
|
super.firstUpdated(_changedProperties);
|
window.addEventListener("resize", this.onWindowResized.bind(this), { passive: true });
|
}
|
disconnectedCallback() {
|
window.removeEventListener("resize", this.onWindowResized.bind(this));
|
super.disconnectedCallback();
|
}
|
onWindowResized() {
|
this.requestUpdate();
|
}
|
render() {
|
if (!this._range || !this._value) {
|
return x``;
|
}
|
const _value = this._value;
|
const width = this.MaxV;
|
const points = this.updateDotStyles(_value, this._range, width);
|
const rangeBetween = this.updateRangeStyles(_value, this._range, width);
|
return x`
|
<div class="slider">
|
<div class="min-slider" style="left: ${points.min}px;"
|
@pointerdown="${this.onMinSliderPointerDown}"></div>
|
<div class="slider-line" @pointerdown="${this.onSliderLinePointerDown}">
|
<div class="range-between"
|
style="left: ${rangeBetween.min}px; right: ${this.MaxV - rangeBetween.max}px"></div>
|
</div>
|
<div class="max-slider" style="left: ${points.max}px;"
|
@pointerdown="${this.onMaxSliderPointerDown}"></div>
|
</div>
|
<div class="sliderValues">
|
<slot name="min"></slot>
|
<slot name="max"></slot>
|
</div>
|
`;
|
}
|
set Value(range) {
|
this._value = range;
|
if (!range) {
|
this._value = this.Range;
|
}
|
}
|
get MaxV() {
|
if (this._direction && this._direction == 1) {
|
return parseFloat(window.getComputedStyle(this._slider || this).height);
|
} else {
|
return parseFloat(window.getComputedStyle(this._slider || this).width);
|
}
|
}
|
get Range() {
|
return this._range;
|
}
|
set Range(range) {
|
this._range = range;
|
}
|
dispatchChange(dispatch = true) {
|
if (this._range) {
|
if (dispatch) {
|
this.dispatchEvent(new CustomEvent("change", {
|
detail: {
|
value: this._value,
|
range: this.Range,
|
actionElement: this._currentActionElement
|
},
|
bubbles: true
|
}));
|
}
|
}
|
}
|
getPointerPosition(e) {
|
let posx = 0, posy = 0;
|
if (e.clientX) {
|
posx = e.clientX;
|
posy = e.clientY;
|
}
|
return { x: posx, y: posy };
|
}
|
handleHorizontalMovement(position) {
|
const width = 0;
|
const maxWidth = this.MaxV;
|
const clampedX = this.clamp(position.x, 0, maxWidth - width);
|
const currentActionPosition = this.applyMinMaxXConstraints(clampedX, maxWidth);
|
const range = {
|
min: this._minPosition.x !== -1 ? this._minPosition.x : currentActionPosition,
|
max: this._maxPosition.x !== -1 ? this._maxPosition.x + width : currentActionPosition + width
|
};
|
if (this._range) {
|
this._value = this.getInterpolatedRange(range, maxWidth, this._range);
|
}
|
}
|
handleVerticalMovement(position) {
|
const height = 0;
|
const maxHeight = this.MaxV;
|
const clampedY = this.clamp(position.y, -height, maxHeight - height);
|
const currentActionPosition = this.applyMinMaxYConstraints(clampedY, maxHeight);
|
this._currentActionElement.style.top = currentActionPosition + "px";
|
const range = {
|
min: this._minPosition.y !== -1 ? this._minPosition.y : currentActionPosition,
|
max: this._maxPosition.y !== -1 ? this._maxPosition.y + height : currentActionPosition + height
|
};
|
if (this._range) {
|
this._value = this.getInterpolatedRange(range, maxHeight, this._range);
|
}
|
}
|
clamp(value, min, max) {
|
return Math.max(min, Math.min(value, max));
|
}
|
applyMinMaxXConstraints(position, width) {
|
position = this._minPosition.x !== -1 ? position > this._minPosition.x + this._minPosition.width ? position : this._minPosition.x + this._minPosition.width : position;
|
position = this._maxPosition.x !== -1 ? position < this._maxPosition.x - this._maxPosition.width ? position : this._maxPosition.x - this._maxPosition.width : position;
|
return this.clamp(position, 0, width);
|
}
|
applyMinMaxYConstraints(position, height) {
|
position = this._minPosition.y !== -1 ? position > this._minPosition.y + this._minPosition.height ? position : this._minPosition.y + this._minPosition.height : position;
|
position = this._maxPosition.y !== -1 ? position < this._maxPosition.y - this._maxPosition.height ? position : this._maxPosition.y - this._maxPosition.height : position;
|
return this.clamp(position, 0, height);
|
}
|
interpolateRangeValue(value, maxV, range) {
|
const _range = range.max - range.min;
|
return this.clamp(range.min + _range * (value / maxV), range.min, range.max);
|
}
|
getInterpolatedRange(value, maxV, range) {
|
return {
|
min: this.interpolateRangeValue(value.min, maxV, range),
|
max: this.interpolateRangeValue(value.max, maxV, range)
|
};
|
}
|
projectValue(value, maxV, range) {
|
const _range = range.max - range.min;
|
const scaled_value = (value - range.min) / _range;
|
if (scaled_value >= 1 / maxV) {
|
value = scaled_value * maxV;
|
} else {
|
value = scaled_value;
|
}
|
return value;
|
}
|
getProjectedValues(values, maxV, range) {
|
return {
|
min: this.projectValue(values.min, maxV, range),
|
max: this.projectValue(values.max, maxV, range)
|
};
|
}
|
updateRangeStyles(values, range, size) {
|
if (typeof values === "number") {
|
return {
|
min: this.projectValue(values, size, range),
|
max: this.projectValue(values, size, range)
|
};
|
}
|
return {
|
min: this.projectValue(values.min, size, range),
|
max: this.projectValue(values.max, size, range)
|
};
|
}
|
updateDotStyles(value, range, size) {
|
let min, max;
|
if (typeof value === "number") {
|
min = max = this.projectValue(value, size - 20, range);
|
if (min > max) {
|
min -= 20;
|
} else {
|
max += 20;
|
}
|
} else {
|
min = this.projectValue(value.min, size, range);
|
max = this.projectValue(value.max, size, range);
|
min = this.clamp(min, 0, max);
|
max = this.clamp(max, min, size);
|
}
|
return {
|
min,
|
max
|
};
|
}
|
updateDisplayValues(range) {
|
if (!this._maxValue) {
|
const element = this.querySelector("[slot=max].sliderValue") || this.querySelector("[slot=max] .sliderValue");
|
if (element) {
|
this._maxValue = element;
|
}
|
}
|
if (!this._minValue) {
|
const element = this.querySelector("[slot=min].sliderValue") || this.querySelector("[slot=min] .sliderValue");
|
if (element) {
|
this._minValue = element;
|
}
|
}
|
if (this._maxValue) {
|
const maxValue = this._formatDisplayValueFunction(Math.round(range.max));
|
this.setInputValue(this._maxValue, maxValue);
|
this.addChangeListener(this._maxValue, (ev, value) => {
|
if (this._range && this._value && value && !isNaN(parseFloat(value))) {
|
const multiplier = 1 / parseFloat(this._formatDisplayValueFunction(1));
|
const newValue = multiplier * parseFloat(value);
|
if (typeof this._value === "object") {
|
this._value = {
|
min: this._value.min,
|
max: Math.min(Math.max(newValue, this._value.min), this._range.max)
|
};
|
} else if (typeof this._value === "number") {
|
if (this._range) {
|
this._value = {
|
min: this._range.min,
|
max: Math.min(Math.max(newValue, this._range.min), this._range.max)
|
};
|
}
|
}
|
this.dispatchChange(true);
|
this.requestUpdate();
|
}
|
});
|
}
|
if (this._minValue) {
|
const minValue = this._formatDisplayValueFunction(Math.round(range.min));
|
this.setInputValue(this._minValue, minValue);
|
this.addChangeListener(this._minValue, (ev, value) => {
|
if (this._range && this._value && value && !isNaN(parseFloat(value))) {
|
const multiplier = 1 / parseFloat(this._formatDisplayValueFunction(1));
|
const newValue = multiplier * parseFloat(value);
|
if (typeof this._value === "object") {
|
this._value = {
|
min: Math.max(Math.min(newValue, this._value.max), this._range.min),
|
max: this._value.max
|
};
|
} else if (typeof this._value === "number") {
|
this._value = {
|
min: Math.max(Math.min(newValue, this._range.max), this._range.min),
|
max: this._range.max
|
};
|
}
|
this.dispatchChange(true);
|
this.requestUpdate();
|
}
|
});
|
}
|
}
|
checkInputFormat(ev) {
|
if (ev.data && !this.inputRegex.test(ev.data)) {
|
ev.preventDefault();
|
}
|
}
|
setInputValue(element, value) {
|
if (element instanceof HTMLInputElement || element instanceof InputComponent) {
|
element.value = value;
|
} else {
|
element.textContent = value;
|
}
|
}
|
addChangeListener(element, listener) {
|
if (element instanceof HTMLInputElement) {
|
element.addEventListener("change", (e) => listener(e, element.value));
|
} else if (element instanceof InputComponent) {
|
element.onBlurChange = (ev, component) => {
|
listener(ev, element.value);
|
};
|
}
|
}
|
onMinSliderPointerDown(e) {
|
var _a, _b;
|
this._currentActionElement = this._minSlider;
|
this._maxPosition = { x: -1, y: -1, height: 0, width: 0 };
|
this._minPosition = { x: -1, y: -1, height: 0, width: 0 };
|
if (this._maxSlider) {
|
const style2 = window.getComputedStyle(this._maxSlider);
|
this._maxPosition = {
|
width: +style2.width.replace("px", ""),
|
height: +style2.height.replace("px", ""),
|
x: +style2.left.replace("px", ""),
|
y: +style2.top.replace("px", "")
|
};
|
this._maxPosition.x = this._maxPosition.x < 0 ? 0 : this._maxPosition.x;
|
this._maxPosition.y = this._maxPosition.y < 0 ? 0 : this._maxPosition.y;
|
}
|
const pos = this.getPointerPosition(e);
|
this.handlePointerDown(e, pos);
|
(_b = (_a = CommunicationInterfaceService.FurnviewWebViewer) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.addEventListener("pointerup", this.globalPointerUp, {
|
passive: true,
|
capture: true
|
});
|
document.addEventListener("pointerup", this.handlePointerUp, false);
|
document.addEventListener("pointermove", this.handlePointerMove, false);
|
}
|
onMaxSliderPointerDown(e) {
|
var _a, _b;
|
this._currentActionElement = this._maxSlider;
|
this._maxPosition = { x: -1, y: -1, height: 0, width: 0 };
|
this._minPosition = { x: -1, y: -1, height: 0, width: 0 };
|
if (this._minSlider) {
|
const style2 = window.getComputedStyle(this._minSlider);
|
this._minPosition = {
|
width: +style2.width.replace("px", ""),
|
height: +style2.height.replace("px", ""),
|
x: +style2.left.replace("px", ""),
|
y: +style2.top.replace("px", "")
|
};
|
if (this._minPosition.x < 0) {
|
this._minPosition.width = this._minPosition.x * -1;
|
this._minPosition.x = 0;
|
}
|
if (this._minPosition.y < 0) {
|
this._minPosition.height = this._minPosition.y * -1;
|
this._minPosition.y = 0;
|
}
|
}
|
const pos = this.getPointerPosition(e);
|
this.handlePointerDown(e, pos);
|
(_b = (_a = CommunicationInterfaceService.FurnviewWebViewer) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.addEventListener("pointerup", this.globalPointerUp, {
|
passive: true,
|
capture: true
|
});
|
document.addEventListener("pointerup", this.handlePointerUp, false);
|
document.addEventListener("pointermove", this.handlePointerMove, false);
|
}
|
onSliderLinePointerDown(e) {
|
var _a, _b;
|
const mousePosition = this.getPointerPosition(e);
|
const boundingRect = this.getBoundingClientRect();
|
let isUsingMinSlider = true;
|
this._currentActionElement = this._minSlider;
|
this._maxPosition = { x: -1, y: -1, height: 0, width: 0 };
|
this._minPosition = { x: -1, y: -1, height: 0, width: 0 };
|
if (this._minSlider && this._maxSlider) {
|
let clickRelative = mousePosition.x - boundingRect.x;
|
let offsetToMinSlider = Math.abs(clickRelative - this._minSlider.offsetLeft);
|
let offsetToMaxSlider = Math.abs(clickRelative - this._maxSlider.offsetLeft);
|
if (this._direction && this._direction == 1) {
|
clickRelative = mousePosition.y - boundingRect.y;
|
offsetToMinSlider = Math.abs(clickRelative - this._minSlider.offsetTop);
|
offsetToMaxSlider = Math.abs(clickRelative - this._maxSlider.offsetTop);
|
}
|
if (offsetToMaxSlider > offsetToMinSlider) {
|
isUsingMinSlider = true;
|
this._currentActionElement = this._minSlider;
|
} else {
|
isUsingMinSlider = false;
|
this._currentActionElement = this._maxSlider;
|
}
|
}
|
if (isUsingMinSlider) {
|
if (this._maxSlider) {
|
const style2 = window.getComputedStyle(this._maxSlider);
|
this._maxPosition = {
|
width: +style2.width.replace("px", ""),
|
height: +style2.height.replace("px", ""),
|
x: +style2.left.replace("px", ""),
|
y: +style2.top.replace("px", "")
|
};
|
this._maxPosition.x = this._maxPosition.x < 0 ? 0 : this._maxPosition.x;
|
this._maxPosition.y = this._maxPosition.y < 0 ? 0 : this._maxPosition.y;
|
}
|
} else {
|
if (this._minSlider) {
|
const style2 = window.getComputedStyle(this._minSlider);
|
this._minPosition = {
|
width: +style2.width.replace("px", ""),
|
height: +style2.height.replace("px", ""),
|
x: +style2.left.replace("px", ""),
|
y: +style2.top.replace("px", "")
|
};
|
if (this._minPosition.x < 0) {
|
this._minPosition.width = this._minPosition.x * -1;
|
this._minPosition.x = 0;
|
}
|
if (this._minPosition.y < 0) {
|
this._minPosition.height = this._minPosition.y * -1;
|
this._minPosition.y = 0;
|
}
|
}
|
}
|
this.handlePointerClick(e, mousePosition);
|
(_b = (_a = CommunicationInterfaceService.FurnviewWebViewer) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.addEventListener("pointerup", this.globalPointerUp, {
|
passive: true,
|
capture: true
|
});
|
document.addEventListener("pointerup", this.handlePointerUp, false);
|
}
|
};
|
SliderComponent.styles = [
|
__superStaticGet(SliderComponent, "styles") || [],
|
i`${r(css_248z)}`
|
];
|
__decorateClass([
|
n({ type: Number, reflect: true, attribute: "direction" })
|
], SliderComponent.prototype, "_direction", 2);
|
__decorateClass([
|
i$1(".min-slider")
|
], SliderComponent.prototype, "_minSlider", 2);
|
__decorateClass([
|
i$1(".max-slider")
|
], SliderComponent.prototype, "_maxSlider", 2);
|
__decorateClass([
|
i$1(".slider")
|
], SliderComponent.prototype, "_slider", 2);
|
__decorateClass([
|
n({ type: Object, reflect: true, attribute: "range" })
|
], SliderComponent.prototype, "_range", 2);
|
__decorateClass([
|
n({ type: Object, reflect: true, attribute: "val" })
|
], SliderComponent.prototype, "_value", 2);
|
__decorateClass([
|
n({ type: Function, reflect: true, attribute: "formatDisplayValue" })
|
], SliderComponent.prototype, "_formatDisplayValueFunction", 2);
|
SliderComponent = __decorateClass([
|
e("fv-slider")
|
], SliderComponent);
|
|
export { SliderComponent };
|