pull/5756/head
Cagatay Civici 2024-05-13 12:19:46 +03:00
commit 7ba23e8e00
1 changed files with 7 additions and 7 deletions

View File

@ -101,7 +101,7 @@ export default {
this.id = this.id || UniqueComponentId(); this.id = this.id || UniqueComponentId();
if (this.type !== 'linear') { if (this.type !== 'linear') {
const button = DomHandler.findSingle(this.container, '[data-pc-name="button"]'); const button = DomHandler.findSingle(this.container, '[data-pc-name="pcbutton"]');
const firstItem = DomHandler.findSingle(this.list, '[data-pc-section="item"]'); const firstItem = DomHandler.findSingle(this.list, '[data-pc-section="item"]');
if (button && firstItem) { if (button && firstItem) {
@ -365,14 +365,14 @@ export default {
const step = (2 * Math.PI) / length; const step = (2 * Math.PI) / length;
return { return {
left: `calc(${radius * Math.cos(step * index)}px + ${$dt('item.diff.x', '0px')})`, left: `calc(${radius * Math.cos(step * index)}px + ${$dt('item.diff.x', '0px').variable})`,
top: `calc(${radius * Math.sin(step * index)}px + ${$dt('item.diff.y', '0px')})` top: `calc(${radius * Math.sin(step * index)}px + ${$dt('item.diff.y', '0px').variable})`
}; };
} else if (type === 'semi-circle') { } else if (type === 'semi-circle') {
const direction = this.direction; const direction = this.direction;
const step = Math.PI / (length - 1); const step = Math.PI / (length - 1);
const x = `calc(${radius * Math.cos(step * index)}px + ${$dt('item.diff.x', '0px')})`; const x = `calc(${radius * Math.cos(step * index)}px + ${$dt('item.diff.x', '0px').variable})`;
const y = `calc(${radius * Math.sin(step * index)}px + ${$dt('item.diff.y', '0px')})`; const y = `calc(${radius * Math.sin(step * index)}px + ${$dt('item.diff.y', '0px').variable})`;
if (direction === 'up') { if (direction === 'up') {
return { left: x, bottom: y }; return { left: x, bottom: y };
@ -386,8 +386,8 @@ export default {
} else if (type === 'quarter-circle') { } else if (type === 'quarter-circle') {
const direction = this.direction; const direction = this.direction;
const step = Math.PI / (2 * (length - 1)); const step = Math.PI / (2 * (length - 1));
const x = `calc(${radius * Math.cos(step * index)}px + ${$dt('item.diff.x', '0px')})`; const x = `calc(${radius * Math.cos(step * index)}px + ${$dt('item.diff.x', '0px').variable})`;
const y = `calc(${radius * Math.sin(step * index)}px + ${$dt('item.diff.y', '0px')})`; const y = `calc(${radius * Math.sin(step * index)}px + ${$dt('item.diff.y', '0px').variable})`;
if (direction === 'up-left') { if (direction === 'up-left') {
return { right: x, bottom: y }; return { right: x, bottom: y };