This commit is contained in:
2025-08-26 14:23:02 +08:00
parent cf334ea439
commit ff63a351e3
7 changed files with 8 additions and 5 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
@@ -105,8 +105,8 @@ export class GirlDetailPanel extends li_BaseView {
this.avatarVideo.node.parent.getComponent(UITransform);
const videoTransform = this.avatarVideo.node.getComponent(UITransform);
if (parentTransform && videoTransform && videoTransform.width > 0) {
const scale = parentTransform.width / videoTransform.width;
if (parentTransform && videoTransform && videoTransform.height > 0) {
const scale = parentTransform.height / videoTransform.height;
this.avatarVideo.node.setScale(scale, scale, 1);
console.log(
`Video scaled to: ${scale}, parent height: ${parentTransform.height}, video height: ${videoTransform.height}`
@@ -19,7 +19,7 @@ export class DetailImageItem extends Component {
base: GirlDetailPanel;
url: string;
isImage: boolean;
uitransform: UITransform;
onLoad() {
@@ -30,6 +30,8 @@ export class DetailImageItem extends Component {
onClickThis() {
let data = {
url: this.url,
isImg: this.isImage,
closeFunc: () => {
this.base.setVideEnable(true);
},
@@ -87,6 +89,7 @@ export class DetailImageItem extends Component {
this.url = path;
let imgPath = this.url;
this.isImage = isImage;
if (!isImage) {
imgPath = this.url + "_thumbnail";
}