Skip to content

Commit

Permalink
Merge pull request #30 from themyth92/fix/23
Browse files Browse the repository at this point in the history
[#23] Fix problem with disable scrolling not working
  • Loading branch information
themyth92 authored Jul 19, 2019
2 parents b729c5c + a2f7616 commit cd0d997
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
4 changes: 3 additions & 1 deletion demo/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Component } from '@angular/core';
import { Subscription } from 'rxjs';

import { Component } from '@angular/core';

import { IAlbum, IEvent, Lightbox, LIGHTBOX_EVENT, LightboxConfig, LightboxEvent } from '../src';

@Component({
Expand Down
3 changes: 2 additions & 1 deletion demo/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';

import { LightboxModule } from '../src';
import { AppComponent } from './app.component';

@NgModule({
imports: [ BrowserModule, LightboxModule ],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-lightbox",
"version": "2.0.0",
"version": "2.0.1",
"description": "A port >= angular5 for lightbox2",
"main": "index.js",
"dependencies": {},
Expand Down Expand Up @@ -29,7 +29,8 @@
"typescript": "3.4.5",
"webpack": "^4.33.0",
"zone.js": "^0.9.1",
"@angular-devkit/build-angular": "~0.800.1"
"@angular-devkit/build-angular": "~0.801.2",
"ngx-lightbox": "^2.0.0"
},
"scripts": {
"start": "./node_modules/.bin/ng serve",
Expand Down
11 changes: 9 additions & 2 deletions src/lightbox.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DOCUMENT } from '@angular/common';
import {
AfterViewInit,
Component,
Expand All @@ -10,9 +11,15 @@ import {
SecurityContext,
ViewChild,
} from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { DomSanitizer } from '@angular/platform-browser';
import { LightboxEvent, LIGHTBOX_EVENT, IAlbum, IEvent, LightboxWindowRef } from './lightbox-event.service';

import {
IAlbum,
IEvent,
LIGHTBOX_EVENT,
LightboxEvent,
LightboxWindowRef,
} from './lightbox-event.service';

@Component({
template: `
Expand Down
5 changes: 1 addition & 4 deletions src/lightbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ body:after {

html.lb-disable-scrolling {
overflow: hidden;
/* Position fixed required for iOS. Just putting overflow: hidden; on the body is not enough. */
position: fixed;
height: 100vh;
width: 100vw;
}

.lightboxOverlay {
Expand All @@ -31,6 +27,7 @@ html.lb-disable-scrolling {
line-height: 0;
font-weight: normal;
box-sizing: content-box;
outline: none;
}

.lightbox .lb-image {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4324,6 +4324,11 @@ neo-async@^2.5.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee"

[email protected]:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ngx-lightbox/-/ngx-lightbox-2.0.0.tgz#c478be6e496c13e62f7db8b452433a7ff917c4e7"
integrity sha512-8Ac3ZmQzjllif9g6knZe9m/nzP4zdszFeaEimJ5apyIfVdQ7C4GaApHhSodY+a+M30N9IRlWu1k5HijKXoOCkw==

nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
Expand Down

0 comments on commit cd0d997

Please sign in to comment.