Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No height because of #swipeview-masterpage position absolute #74

Open
tominhuang opened this issue May 29, 2014 · 0 comments
Open

No height because of #swipeview-masterpage position absolute #74

tominhuang opened this issue May 29, 2014 · 0 comments

Comments

@tominhuang
Copy link

I've seen that wrapper are 100% height and width.

div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out';

The wrapper's content, i.e., masterpages, are absolute.

div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%';

In my use case, I put some images set with width and height (like 100px) within #masterpages, and the wrapper's height is not stretched (0px maybe) in HTML,
All the content I put are not visible. I need to specify the wrapper height manually. That's inconvenient.

A quick fix for this may be:

                div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%';
+ //overwrite absolute
+ if (i == -1) {
+               div.style.cssText = div.style.cssText + ';position:relative;'
+ }
                if (!div.dataset) div.dataset = {};

add below line 82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant