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
// more minimal version of https://github.com/olahol/scrollparent.js/blob/master/scrollparent.js | |
const regex = /(auto|scroll)/; | |
const style = (node, prop) => | |
getComputedStyle(node, null).getPropertyValue(prop); | |
const scroll = (node) => | |
regex.test( | |
style(node, "overflow") + | |
style(node, "overflow-y") + |
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
'use strict'; | |
if (!document.elementsFromPoint) { | |
document.elementsFromPoint = elementsFromPoint; | |
} | |
function elementsFromPoint(x, y) { | |
var parents = []; | |
var parent = void 0; | |
do { |
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
import {TranslateLoader} from "ng2-translate/ng2-translate"; | |
import {Observable} from "rxjs/Observable"; | |
import fs = require('fs'); | |
export class TranslateUniversalLoader implements TranslateLoader { | |
constructor(private prefix: string = 'i18n', private suffix: string = '.json') {} | |
/** | |
* Gets the translations from the server | |
* @param lang |