For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 4 replies, 2 voices, and was last updated 12 years, 8 months ago by
support-octavio.
-
AuthorPosts
-
ilsuoceroMemberI used a canvas to show a progress bar in mobione without problem.
I inserted a transparent panel at the bottom list of the screen objects and then I used the following code:var stile = "position: absolute; z-index: 999; "; var infoArea = document.getElementById('m1-MapDetail-infoArea'); var infoA = document.createElement('canvas'); infoA.id = 'downloadCanvas'; // canvas name infoA.setAttribute("style", stile); infoA.style.cssText = stile; infoA.style.visibility = 'visible'; infoArea.appendChild(infoA);
Once I terminate to show the progress bar, I eliminate the canvas child with:
var myCanvas = document.getElementById("downloadCanvas"); infoArea.removeChild(myCanvas);
Eberything is ok… But, the transparent panel in the highest position disables all stuff below it, like buttons or scroll panels.
So, I defined a transparent panel in the first position and all objects of the screen depending from it.–panel(transparent)
!— button
!— scroll panel
!— text
!— other stuff…Using the code above, the canvas child has to be create at the bottom position. Then, in the style i use the z-index at the 999 position which must be in the highest level. So if I create the canvas child and I delete it after showing the progress bar, I should then be able to use scroll panel and buttons.
BUT, the canvas remains always hidden. why?
Thanks
RobertoJanuary 8, 2013 at 2:29 am #333893
ilsuoceroMemberPartially solved.
One problem persist….
partial Solution:First I used
$('#m1-MapDetail-infoArea').css('z-index', '999');
to move the element at the top when the canvas is created and then a little thin gray area appared at the bottom of the screen. The reason is because offsetTop of the canvas was positioned at the end of the last object. No way to modify it.
So, I moved the transparent panel alone in the first position; not with the other objects depending from it as before.
-|transparent panel
-|button
-|other stuff…
Then the whole screen became gray and the progress bar show started.
At the end of the progress bar show, i delete the canvas child and I use the code below for pushing back the transparent panel so buttons and scroll panels should be enabled again.$('#m1-MapDetail-infoArea').css('z-index', '1');
BUT even though the debug shows the object’s z-index = 1 the transparent panel remains in the highest position since I cannot touch enymore in the screen.
January 8, 2013 at 5:30 am #333897
ilsuoceroMemberA sample test case is here:
http://goo.gl/SXcecregards
January 8, 2013 at 7:51 am #333898
ilsuoceroMemberFinally SOLVED!
Since all css elements by default are set to “auto” the element that you want to move in a different position has to be returned to “auto” if you want to move it back to its original pos.
$('#m1-test_canvasZindex-panel1').css('z-index',999);
The element is in highest position
$('#m1-test_canvasZindex-panel1').css('z-index', 'auto');
The element is back to its original position.
The above link has now a correct running example.
Happy new year.
January 8, 2013 at 5:13 pm #333925
support-octavioMemberThanks for your follow up informing that your problem is resolved. Marking thread as closed.
-
AuthorPosts