Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Commit

Permalink
bug: Sample layout-header-drawer-footer did not show a scroll shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMitterer committed Mar 4, 2015
1 parent 3c1c07d commit 6b7927d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
12 changes: 8 additions & 4 deletions example/layout-header-drawer-footer/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import 'package:console_log_handler/console_log_handler.dart';

import 'package:wsk_material/wskcomponets.dart';

final Logger _logger = new Logger('layout-header-drawer-footer');

void main() {
html.querySelector("body").classes.add("update-theme");
configLogging();

scrollChecker();

registerAllWskComponents();
upgradeAllRegistered();
html.querySelector("body").classes.remove("update-theme");
}

void configLogging() {
Expand All @@ -27,10 +27,14 @@ void configLogging() {

void scrollChecker() {
final html.HtmlElement body = html.querySelector("body");
final html.HtmlElement content = html.querySelector(".wsk-layout__content");

// .wsk-layout__content section hat overflow: scroll - kein scroll event
final html.HtmlElement content = html.querySelector(".wsk-layout__content section");

final html.HtmlElement shadow = html.querySelector(".addscrollshadow");
final html.ButtonElement button = html.querySelector("#totop");

_logger.info(button);
if(content == null || shadow == null || button == null) {
return;
}
Expand All @@ -41,7 +45,7 @@ void scrollChecker() {

content.onScroll.listen((final html.Event event) {
final int top = content.scrollTop;

print(top);
if(top > 25) {
shadow.classes.add("wsk-shadow--z2");
} else {
Expand Down
14 changes: 7 additions & 7 deletions example/layout-header-drawer-footer/web/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,8 @@ dt {
padding: 16px;
color: #A0A0A0;
background-color: #454545;
min-height: 36px; }
min-height: 36px;
box-sizing: border-box; }
.wsk-mini-footer-flex .wsk-mini-footer--left-section {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -2826,7 +2827,8 @@ body {
padding-top: 20px; }

footer.wsk-mini-footer {
padding: 16px; }
min-height: 68px;
max-height: 68px; }

.back-to-top {
position: fixed;
Expand All @@ -2838,8 +2840,8 @@ footer.wsk-mini-footer {
z-index: 99; }

.add-back-to-top-button .back-to-top {
bottom: 15px;
right: 15px;
right: 24px;
bottom: 82px;
opacity: 1;
-webkit-transition: all 0.3s ease-in;
transition: all 0.3s ease-in; }
Expand All @@ -2849,8 +2851,6 @@ footer.wsk-mini-footer {
left: auto;
right: -100px; }
.add-back-to-top-button .back-to-top {
left: auto;
right: 15px;
bottom: 15px; }
left: auto; }
.hide-on-mobile {
display: none; } }
16 changes: 5 additions & 11 deletions example/layout-header-drawer-footer/web/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ body {
flex-direction : column;
}


//.wsk-layout {
// //min-height: 100vh;
//}

.wsk-layout__content {
display : flex;
flex-direction : row;
Expand All @@ -50,7 +45,8 @@ body {
}

footer.wsk-mini-footer {
padding: 16px;
min-height : 68px;
max-height : 68px;
}

.back-to-top {
Expand All @@ -59,22 +55,20 @@ footer.wsk-mini-footer {
}

.add-back-to-top-button .back-to-top {
bottom : 15px; right : 15px;
right : 24px;
bottom : 82px;
opacity : 1;
transition : all 0.3s ease-in;
}


@media screen and (max-width : $layout-screen-size-threshold) {

.back-to-top {
left : auto;
right : -100px;
}
.add-back-to-top-button .back-to-top {
left : auto;
right : 15px;
bottom : 15px;
left : auto;
}

.hide-on-mobile {
Expand Down
1 change: 1 addition & 0 deletions lib/sass/footer/_mini_footer-flex.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $footer-btn-size : 36px !default;
color : $footer-color;
background-color : $footer-bg-color;
min-height : $footer-btn-size;
box-sizing : border-box;

.wsk-mini-footer--left-section {
display : flex;
Expand Down

0 comments on commit 6b7927d

Please sign in to comment.