-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(popover,tooltip): add adaptivePosition option to disable adaptiv…
…e positioning
- Loading branch information
Showing
15 changed files
with
159 additions
and
69 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
demo/src/app/components/+popover/demos/adaptive-position/adaptive-position.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<button type="button" class="btn btn-default btn-secondary" | ||
popover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." | ||
popoverTitle="Popover on top" | ||
[adaptivePosition]="false" | ||
placement="top"> | ||
Popover on top | ||
</button> | ||
|
||
<button type="button" class="btn btn-default btn-secondary" | ||
popover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." | ||
popoverTitle="Popover on right" | ||
[adaptivePosition]="false" | ||
placement="right"> | ||
Popover on right | ||
</button> |
7 changes: 7 additions & 0 deletions
7
demo/src/app/components/+popover/demos/adaptive-position/adaptive-position.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-popover-adaptive-position', | ||
templateUrl: './adaptive-position.html' | ||
}) | ||
export class DemoPopoverAdaptivePositionComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
import { DemoPopoverAdaptivePositionComponent } from './adaptive-position/adaptive-position'; | ||
import { DemoPopoverBasicComponent } from './basic/basic'; | ||
import { DemoPopoverPlacementComponent } from './placement/placement'; | ||
import { DemoPopoverByIsOpenPropComponent } from './trigger-by-isopen-property/trigger-by-isopen-property'; | ||
import { DemoPopoverClassComponent } from './class/class'; | ||
import { DemoPopoverConfigComponent } from './config/config'; | ||
import { DemoPopoverContainerComponent } from './container/container'; | ||
import { DemoPopoverContextComponent } from './popover-context/popover-context'; | ||
import { DemoPopoverCustomContentComponent } from './custom-content/custom-content'; | ||
import { DemoPopoverDismissComponent } from './dismiss/dismiss'; | ||
import { DemoPopoverDynamicComponent } from './dynamic/dynamic'; | ||
import { DemoPopoverCustomContentComponent } from './custom-content/custom-content'; | ||
import { DemoPopoverDynamicHtmlComponent } from './dynamic-html/dynamic-html'; | ||
import { DemoPopoverContainerComponent } from './container/container'; | ||
import { DemoPopoverConfigComponent } from './config/config'; | ||
import { DemoPopoverEventsComponent } from './events/events'; | ||
import { DemoPopoverOutsideClickComponent } from './outside-click/outside-click'; | ||
import { DemoPopoverPlacementComponent } from './placement/placement'; | ||
import { DemoPopoverStylingGlobalComponent } from './styling-global/styling-global'; | ||
import { DemoPopoverStylingLocalComponent } from './styling-local/styling-local'; | ||
import { DemoPopoverTriggersCustomComponent } from './triggers-custom/triggers-custom'; | ||
import { DemoPopoverTriggersManualComponent } from './triggers-manual/triggers-manual'; | ||
import { DemoPopoverByIsOpenPropComponent } from './trigger-by-isopen-property/trigger-by-isopen-property'; | ||
import { DemoPopoverClassComponent } from './class/class'; | ||
import { DemoPopoverOutsideClickComponent } from './outside-click/outside-click'; | ||
import { DemoPopoverEventsComponent } from './events/events'; | ||
import { DemoPopoverContextComponent } from './popover-context/popover-context'; | ||
|
||
export const DEMO_COMPONENTS = [ | ||
DemoPopoverAdaptivePositionComponent, | ||
DemoPopoverBasicComponent, | ||
DemoPopoverPlacementComponent, | ||
DemoPopoverByIsOpenPropComponent, | ||
DemoPopoverClassComponent, | ||
DemoPopoverConfigComponent, | ||
DemoPopoverContainerComponent, | ||
DemoPopoverContextComponent, | ||
DemoPopoverCustomContentComponent, | ||
DemoPopoverDismissComponent, | ||
DemoPopoverDynamicComponent, | ||
DemoPopoverCustomContentComponent, | ||
DemoPopoverDynamicHtmlComponent, | ||
DemoPopoverContainerComponent, | ||
DemoPopoverConfigComponent, | ||
DemoPopoverEventsComponent, | ||
DemoPopoverOutsideClickComponent, | ||
DemoPopoverPlacementComponent, | ||
DemoPopoverStylingGlobalComponent, | ||
DemoPopoverStylingLocalComponent, | ||
DemoPopoverTriggersCustomComponent, | ||
DemoPopoverTriggersManualComponent, | ||
DemoPopoverByIsOpenPropComponent, | ||
DemoPopoverClassComponent, | ||
DemoPopoverOutsideClickComponent, | ||
DemoPopoverEventsComponent, | ||
DemoPopoverContextComponent | ||
DemoPopoverTriggersManualComponent | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
demo/src/app/components/+tooltip/demos/adaptive-position/adaptive-position.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<button type="button" class="btn btn-default btn-secondary mb-2" | ||
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." | ||
[adaptivePosition]="false" | ||
placement="top"> | ||
Tooltip on top | ||
</button> | ||
|
||
<button type="button" class="btn btn-default btn-secondary mb-2" | ||
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." | ||
[adaptivePosition]="false" | ||
placement="right"> | ||
Tooltip on right | ||
</button> |
7 changes: 7 additions & 0 deletions
7
demo/src/app/components/+tooltip/demos/adaptive-position/adaptive-position.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-tooltip-adaptive-position', | ||
templateUrl: './adaptive-position.html' | ||
}) | ||
export class DemoTooltipAdaptivePositionComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
import { DemoTooltipAdaptivePositionComponent } from './adaptive-position/adaptive-position'; | ||
import { DemoTooltipBasicComponent } from './basic/basic'; | ||
import { DemoTooltipPlacementComponent } from './placement/placement'; | ||
import { DemoTooltipDismissComponent } from './dismiss/dismiss'; | ||
import { DemoTooltipDynamicComponent } from './dynamic/dynamic'; | ||
import { DemoTooltipClassComponent } from './class/class'; | ||
import { DemoTooltipConfigComponent } from './config/config'; | ||
import { DemoTooltipContainerComponent } from './container/container'; | ||
import { DemoTooltipCustomContentComponent } from './custom-content/custom-content'; | ||
import { DemoTooltipDelayComponent } from './delay/delay'; | ||
import { DemoTooltipDismissComponent } from './dismiss/dismiss'; | ||
import { DemoTooltipDynamicComponent } from './dynamic/dynamic'; | ||
import { DemoTooltipDynamicHtmlComponent } from './dynamic-html/dynamic-html'; | ||
import { DemoTooltipPlacementComponent } from './placement/placement'; | ||
import { DemoTooltipStylingGlobalComponent } from './styling-global/styling-global'; | ||
import { DemoTooltipStylingLocalComponent } from './styling-local/styling-local'; | ||
import { DemoTooltipTriggersCustomComponent } from './triggers-custom/triggers-custom'; | ||
import { DemoTooltipTriggersManualComponent } from './triggers-manual/triggers-manual'; | ||
import { DemoTooltipDynamicHtmlComponent } from './dynamic-html/dynamic-html'; | ||
import { DemoTooltipClassComponent } from './class/class'; | ||
import { DemoTooltipDelayComponent } from './delay/delay'; | ||
import { DemoTooltipCustomContentComponent } from './custom-content/custom-content'; | ||
|
||
export const DEMO_COMPONENTS = [ | ||
DemoTooltipAdaptivePositionComponent, | ||
DemoTooltipBasicComponent, | ||
DemoTooltipPlacementComponent, | ||
DemoTooltipDismissComponent, | ||
DemoTooltipClassComponent, | ||
DemoTooltipConfigComponent, | ||
DemoTooltipContainerComponent, | ||
DemoTooltipCustomContentComponent, | ||
DemoTooltipDelayComponent, | ||
DemoTooltipDismissComponent, | ||
DemoTooltipDynamicComponent, | ||
DemoTooltipDynamicHtmlComponent, | ||
DemoTooltipContainerComponent, | ||
DemoTooltipConfigComponent, | ||
DemoTooltipPlacementComponent, | ||
DemoTooltipStylingGlobalComponent, | ||
DemoTooltipStylingLocalComponent, | ||
DemoTooltipTriggersCustomComponent, | ||
DemoTooltipTriggersManualComponent, | ||
DemoTooltipClassComponent, | ||
DemoTooltipDelayComponent | ||
DemoTooltipTriggersManualComponent | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
demo/src/app/components/+typeahead/demos/adaptive-position/adaptive-position.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<pre class="card card-block card-header mb-3">Model: {{selected | json}}</pre> | ||
<input [(ngModel)]="selected" | ||
[typeahead]="states" | ||
adaptivePosition="true" | ||
[adaptivePosition]="true" | ||
class="form-control"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,8 @@ export interface Options { | |
flip?: { | ||
enabled: boolean; | ||
}; | ||
preventOverflow?: { | ||
enabled: boolean; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters