Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
ad3f4b31fa | |||
91b50ecde5 | |||
45fecfbde8 | |||
e3e6d06969 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.31",
|
"version": "1.0.33",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.31",
|
"version": "1.0.33",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "tools to simplify complex css structures",
|
"description": "tools to simplify complex css structures",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,8 @@ import { Stringmap } from '@pushrocks/lik/dist_ts/lik.stringmap';
|
|||||||
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap';
|
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap';
|
||||||
import { TViewport } from './domtools.breakpoints';
|
import { TViewport } from './domtools.breakpoints';
|
||||||
|
|
||||||
|
import { Scroller } from './domtools.classes.scroller';
|
||||||
|
|
||||||
export interface IDomToolsState {
|
export interface IDomToolsState {
|
||||||
virtualViewport: TViewport;
|
virtualViewport: TViewport;
|
||||||
}
|
}
|
||||||
@ -57,6 +59,8 @@ export class DomTools {
|
|||||||
debug: false,
|
debug: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
public scroller: plugins.SweetScroll;
|
||||||
|
|
||||||
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
|
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
|
||||||
async (statePart, payload) => {
|
async (statePart, payload) => {
|
||||||
const currentState = statePart.getState();
|
const currentState = statePart.getState();
|
||||||
@ -71,15 +75,11 @@ export class DomTools {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
// lets care about third party stuff
|
// lets care about third party stuff
|
||||||
document.addEventListener(
|
this.domToolsReady.promise.then(() => {
|
||||||
'DOMContentLoaded',
|
this.scroller = new plugins.SweetScroll({
|
||||||
() => {
|
|
||||||
const scroller = new plugins.sweetscroll({
|
|
||||||
/* some options */
|
/* some options */
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
false,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private runOnceTrackerStringMap = new Stringmap();
|
private runOnceTrackerStringMap = new Stringmap();
|
||||||
|
5
ts/domtools.classes.scroller.ts
Normal file
5
ts/domtools.classes.scroller.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import * as plugins from './domtools.plugins';
|
||||||
|
|
||||||
|
export class Scroller {
|
||||||
|
// TODO: move sweet scroll over to here;
|
||||||
|
}
|
@ -1 +0,0 @@
|
|||||||
import * as plugins from './domtools.plugins';
|
|
@ -8,6 +8,6 @@ import * as websetup from '@pushrocks/websetup';
|
|||||||
export { smartpromise, smartrouter, smartstate, webrequest, websetup };
|
export { smartpromise, smartrouter, smartstate, webrequest, websetup };
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import sweetscroll from 'sweet-scroll';
|
import SweetScroll from 'sweet-scroll';
|
||||||
|
|
||||||
export { sweetscroll };
|
export { SweetScroll };
|
||||||
|
Reference in New Issue
Block a user