mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
Add !important tag to the sibling's margin on sidebar folded
This commit is contained in:
parent
58ab766edf
commit
1e47c79f15
|
@ -1,4 +1,4 @@
|
|||
import { ChangeDetectorRef, Component, ElementRef, HostBinding, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewEncapsulation } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, ElementRef, HostBinding, HostListener, Input, OnDestroy, OnInit, Renderer2, RendererStyleFlags2, ViewEncapsulation } from '@angular/core';
|
||||
import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
|
||||
import { ObservableMedia } from '@angular/flex-layout';
|
||||
import { Subject } from 'rxjs';
|
||||
|
@ -118,12 +118,12 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
|
|||
if ( this.position === 'left' )
|
||||
{
|
||||
sibling = this._elementRef.nativeElement.nextElementSibling;
|
||||
styleRule = 'marginLeft';
|
||||
styleRule = 'margin-left';
|
||||
}
|
||||
else
|
||||
{
|
||||
sibling = this._elementRef.nativeElement.previousElementSibling;
|
||||
styleRule = 'marginRight';
|
||||
styleRule = 'margin-right';
|
||||
}
|
||||
|
||||
// If there is no sibling, return...
|
||||
|
@ -136,7 +136,7 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
|
|||
if ( value )
|
||||
{
|
||||
// Set the style
|
||||
this._renderer.setStyle(sibling, styleRule, styleValue);
|
||||
this._renderer.setStyle(sibling, styleRule, styleValue, RendererStyleFlags2.Important + RendererStyleFlags2.DashCase);
|
||||
}
|
||||
// If unfolded...
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user