From 31e5c36501e94f80be3fd6d44731f4e78923c874 Mon Sep 17 00:00:00 2001 From: Dev 1 Date: Fri, 15 Sep 2023 16:41:05 +0530 Subject: [PATCH] c --- src/pages/tracing/index.astro | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/pages/tracing/index.astro b/src/pages/tracing/index.astro index 90b1d78..865a340 100644 --- a/src/pages/tracing/index.astro +++ b/src/pages/tracing/index.astro @@ -31,7 +31,7 @@ import Layout from "../../layouts/Layout.astro"; type: Phaser.AUTO, width: window.innerWidth, height: window.innerHeight, - backgroundColor: '#05b3a4', + backgroundColor: '#fff', scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_HORIZONTALLY, @@ -74,23 +74,22 @@ import Layout from "../../layouts/Layout.astro"; this.add.text(customWidth / 10, 20, data.letter_text, textStyle); const textStyle2 = {font: 'bold 40px quicksand', fill: '#5e17eb',}; if(!isMobile){ - image = this.add.image(customWidth / 4, customHeight / 2, 'letter_img'); - image.setInteractive().setDepth(1).setScale(0.6); - letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img'); - letter_img.setDepth().setScale(0.6); - this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2); + image = this.add.image(customWidth / 4, customHeight / 2, 'letter_img'); + image.setInteractive().setDepth(1).setScale(0.6); + letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img'); + letter_img.setDepth().setScale(0.6); + this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2); } else{ - image = this.add.image(customWidth / 2.5, customHeight / 2.5, 'letter_img'); - image.setInteractive().setDepth(1).setScale(0.3); - letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100 , 'icon_img'); - letter_img.setDepth().setScale(0.3); - this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2); + image = this.add.image(customWidth / 2.5, customHeight / 2.5, 'letter_img'); + image.setInteractive().setDepth(1).setScale(0.3); + letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100 , 'icon_img'); + letter_img.setDepth().setScale(0.3); + this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2); } }) .catch(error => { console.error('Error fetching initial data:', error); }); - graphics = this.add.graphics(); if(!isMobile){ graphics.lineStyle(50, 0x5e17eb); @@ -98,7 +97,6 @@ import Layout from "../../layouts/Layout.astro"; graphics.lineStyle(25, 0x5e17eb); } this.add.image(customWidth / 2 * 1.6 - 0.5, 50 , 'topLogo'); - this.input.on('pointerdown', function (pointer) { if (image.getBounds().contains(pointer.x, pointer.y)) { // Start dragging only if the pointer is over the image