-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from fleetbase/dev-v0.2.30
improved leaflet loading service, fixed helpers, improved overlay cal…
- Loading branch information
Showing
22 changed files
with
327 additions
and
212 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
<div class="timeline-item {{if this.isActive 'active animate-pulse'}}" ...attributes>{{yield @activity @context}}</div> | ||
<div class="timeline-item {{if this.isActive 'active'}}" ...attributes>{{yield @activity @context}}</div> |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import { isEmpty } from '@ember/utils'; | ||
|
||
export default helper(function isNotEmpty(positional /*, named*/) { | ||
return positional; | ||
export default helper(function isNotEmpty([subject]) { | ||
return !isEmpty(subject); | ||
}); |
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,6 +1,5 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import { isArray } from '@ember/array'; | ||
|
||
export default helper(function isObject([object]) { | ||
return object !== null && typeof object === 'object' && !isArray(object); | ||
export default helper(function isObject([obj]) { | ||
return obj && typeof obj === 'object' && Object.prototype.toString.call(obj) === '[object Object]'; | ||
}); |
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,34 @@ | ||
import { modifier } from 'ember-modifier'; | ||
import numbersOnly from '../utils/numbers-only'; | ||
|
||
export default modifier(function setMaxHeight(element, [height]) { | ||
if (height === undefined || height === null) { | ||
return; | ||
} | ||
|
||
let heightValue = height; | ||
let unit = ''; | ||
|
||
// Check if height is a string with a unit | ||
if (typeof height === 'string') { | ||
const match = height.match(/^(\d+(?:\.\d+)?)(\D+)?$/); | ||
if (match !== null) { | ||
heightValue = match[1]; | ||
unit = match[2] || ''; | ||
} | ||
} | ||
|
||
// Convert the height value to pixels | ||
if (unit === 'em') { | ||
heightValue *= 16; // 1em = 16px | ||
} else if (unit === 'rem') { | ||
heightValue *= 16; // 1rem = 16px (assuming default font size of 16px) | ||
} else if (unit === 'pt') { | ||
heightValue *= 1.33; // 1pt = 1.33px (assuming 96dpi) | ||
} else if (unit === 'pc') { | ||
heightValue *= 16; // 1pc = 16px (assuming 12pt = 16px) | ||
} | ||
|
||
// Set the max height of the element by the value | ||
element.style.maxHeight = `${numbersOnly(heightValue)}px`; | ||
}); |
Oops, something went wrong.