Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48f43fa

Browse files
committed
chore: sync with v4.3
2 parentsbf936a9 +ed678c7 commit48f43fa

File tree

7 files changed

+198
-95
lines changed

7 files changed

+198
-95
lines changed

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name":"coreui-angular-dev",
33
"version":"4.2.27",
44
"description":"CoreUI Components Library for Angular",
5+
"copyright":"Copyright 2022 creativeLabs Łukasz Holeczek",
56
"license":"MIT",
67
"author":"The CoreUI Team (https://github.com/orgs/coreui/people)",
78
"scripts": {

‎projects/coreui-angular/src/lib/backdrop/backdrop.service.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ export class BackdropService {
1414
privateunListen!:()=>void;
1515

1616
constructor(
17-
@Inject(DOCUMENT)privatedocument:any,
17+
@Inject(DOCUMENT)privatedocument:Document,
1818
privaterendererFactory:RendererFactory2
1919
){
2020
this.renderer=rendererFactory.createRenderer(null,null);
2121
}
2222

23+
getscrollbarWidth(){
24+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
25+
constdocumentWidth=this.document.documentElement.clientWidth;
26+
constscrollbarWidth=Math.abs((window?.innerWidth??documentWidth)-documentWidth);
27+
return`${scrollbarWidth}px`;
28+
}
29+
2330
setBackdrop(type:string='modal'):any{
2431
constbackdropElement=this.renderer.createElement('div');
2532
this.renderer.addClass(backdropElement,`${type}-backdrop`);

‎projects/coreui-angular/src/lib/modal/modal/modal.component.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,9 @@ export class ModalComponent implements OnInit, OnDestroy {
184184

185185
private_show=true;
186186

187-
privategetscrollbarWidth(){
188-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
189-
constdocumentWidth=this.document.documentElement.clientWidth;
190-
constscrollbarWidth=Math.abs((window?.innerWidth??documentWidth)-documentWidth);
191-
return`${scrollbarWidth}px`;
192-
}
193-
194187
@HostListener('@showHide.start',['$event'])
195188
animateStart(event:AnimationEvent){
196-
constscrollbarWidth=this.scrollbarWidth;
189+
constscrollbarWidth=this.backdropService.scrollbarWidth;
197190
if(event.toState==='visible'){
198191
this.renderer.setStyle(this.document.body,'overflow','hidden');
199192
this.renderer.setStyle(this.document.body,'padding-right',scrollbarWidth);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:host {
2+
display:none;
3+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp