Commit 462aba26 authored by zjz1994's avatar zjz1994

检查stageHeight的null问题1

parent d4a07c7a
......@@ -3,6 +3,7 @@ import ComponentBase from "./ComponentBase";
export default class Panel extends ComponentBase {
public onShowAnim(){
console.log("test==Panel");
console.log('panel height',this.height,'stage height',this.stage.stageHeight,'pane skin',this.skinKey);
let targetY:number;
// if(this.skinKey=='Turntable'){
......
......@@ -7,6 +7,7 @@ export default class Scene extends ComponentBase {
start(data?) {
super.start(data);
console.log("test==Scene");
this.height = this.stage.stageHeight;
this.playAnimation();
}
......
......@@ -10,6 +10,7 @@ export default class H52Scene extends Scene {
async start(data?) {
NetManager.ins.showLog(getlogItem(51));
super.start();
// console.log("test==getH52");
this['group'].y = (this.stage.stageHeight -1624)/2
// this.height=this.stage.stageHeight;
// this['rulebtn'].addEventListener(egret.TouchEvent.TOUCH_TAP,()=>{
......
......@@ -27,9 +27,9 @@ export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer,ra
const showoff = new FriendWxShare();
showoff.loadSkin();
showoff.start(rank);
console.log("test==getFriendShare");
if (parent) {
parent.addChild(showoff);
showoff.y = showoff.stage.stageHeight/2- showoff.height/2;
};
......@@ -37,6 +37,7 @@ export const getFriendShareUrl = async (parent?: egret.DisplayObjectContainer,ra
img.style.display = 'block';
Loading.instace.show();
setTimeout(() => {
console.log("test==getFriendShare1");
const base64 = getPrintScreenData(showoff, 0, (showoff.height - showoff.stage.stageHeight)/2, pic.textureWidth, parent.stage.stageHeight);
img.src = base64;
Loading.instace.hide();
......
......@@ -34,6 +34,7 @@ export const getShareUrl = async (parent?: egret.DisplayObjectContainer) => {
if (parent) parent.addChild(showoff);
showoff.visible = false;
img.style.display = 'block';
// console.log("test==getSharePic");
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, parent.stage.stageHeight);
// NetManager.ins.imgUrl((success) => {
// const data = DataManager.ins.getData('imgURL');
......
......@@ -26,7 +26,7 @@ export default async (stage, parent?: egret.DisplayObjectContainer, ) => {
showoff.start();
if (parent) parent.addChild(showoff);
showoff.visible=false;
// console.log("test==getShowOff");
const base64 = getPrintScreenData(showoff['pic'], 0, 0, pic.textureWidth, stage.stageHeight);
img.style.display='block';
// NetManager.ins.imgUrl((success) => {
......
......@@ -21,6 +21,7 @@ class Share2 extends ComponentBase {
start() {
this.once(egret.TouchEvent.ADDED_TO_STAGE, () => {
// console.log("test==shareCtrl");
this.height = this.stage.stageHeight;
}, this);
......
......@@ -20,6 +20,7 @@ class Share3 extends ComponentBase {
this['avatar'].source = user.avatar;
this['nameTxt'].text = getNick(user.nickname);
this.once(egret.TouchEvent.ADDED_TO_STAGE, () => {
// console.log("test==getFriendShare3");
this.height = this.stage.stageHeight;
}, this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment