Commit c3d04f06 authored by zchkfmn's avatar zchkfmn
Browse files

Fixed the Caps and Dom loading issues

parent c4f2f2cb
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -8,8 +8,7 @@ import ArrowLeftIcon from '@mui/icons-material/ArrowLeft';
import Typography from '@mui/material/Typography';
import AppBar from '@mui/material/AppBar';
import Container from '@mui/material/Container';
import GeoTiffViewer from "./geoTiffViewer";
//import GeoTiffViewer from "../../js/geoTIffViewer";
import GeoTiffViewer from "../../js/geoTIffViewer";

const css = {
  shown: {
@@ -73,7 +72,7 @@ export default function App() {
      <div id="geoTiff-Container">
        <Container>
          <AppBar position="relative">
            <Container>
            <Container sx={{ mr: 2, display: { xs: 'none', md: 'flex' } }}>
              <Typography 
                variant="h6"
                id="geoTiff-Asset-name"
@@ -84,7 +83,7 @@ export default function App() {
                >
                  Displayed GeoTiff
                </Typography>
                <button onClick={geoTiffViewer.toggleViewer()} 
                <button onClick={geoTiffViewer.toggleViewer} 
                  id="geoTiffClose">
                    CLOSE
                </button>
+14 −9
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ export default class GeoTiffViewer {
				console.log(base64data);
			}

			const geoTiffDiv = document.getElementbyID(this._imgDiv)  
			const geoTiffDiv = document.getElementById(this._imgDiv)  
			geoTiffDiv.innerHTML = ''; 

			const imageObjectURL = URL.createObjectURL(imageBlob);
@@ -60,7 +60,7 @@ export default class GeoTiffViewer {

			img.src = imageObjectURL;

			document.getElementbyID(this._imgDiv).appendChild(img);
			document.getElementById(this._imgDiv).appendChild(img);
			
		})

@@ -77,17 +77,22 @@ export default class GeoTiffViewer {
	 * */
	toggleViewer()
	{
		var div = document.getElementbyID("");
		if (div.style.display == "none")
		const geoTiffContainerDiv = document.getElementById("geoTiff-Container") 
		
		if(geoTiffContainerDiv != null )
		{
			if (geoTiffContainerDiv.style.display == "none")
			{
			x.style.diplay = "block";
				geoTiffContainerDiv.style.display = "block";

			}
			else
			{
			x.style.diplay = "none"; 
				geoTiffContainerDiv.style.display = "none"; 
			}
		}
		
	}


}
 No newline at end of file
+2 −9
Original line number Diff line number Diff line
@@ -276,20 +276,13 @@ summary {
}

#geoTiff-Container {
  width: 300px;
  width: 400px;
  text-align: center;
  margin: 0 auto;
  display: none;
  background: lightgray;
  color: black;
}

#geoTiff-Asset-name {
  text-align: center;
  flex-grow: 1;
}
 No newline at end of file

#geoTiffClose {
  text-align: center;
  background: darkgray;
}
 No newline at end of file