mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 14:54:12 +00:00
Inspector bugfix
This commit is contained in:
parent
85c717d350
commit
c2d18d2be6
3 changed files with 4 additions and 11 deletions
|
@ -284,7 +284,6 @@ class WebView extends Component {
|
|||
});
|
||||
|
||||
window.addEventListener('scroll', (e) => {
|
||||
console.log('event', e);
|
||||
if (!responsivelyApp.mouseOn) {
|
||||
return;
|
||||
}
|
||||
|
@ -319,7 +318,6 @@ class WebView extends Component {
|
|||
return;
|
||||
}
|
||||
e.responsivelyAppProcessed = true;
|
||||
console.log('clicked', e);
|
||||
window.responsivelyApp.sendMessageToHost(
|
||||
'${MESSAGE_TYPES.click}',
|
||||
{
|
||||
|
|
|
@ -84,7 +84,6 @@ global.responsivelyApp = {
|
|||
};
|
||||
|
||||
ipcRenderer.on('scrollMessage', (event, args) => {
|
||||
console.log('Recieved scroll message from host', event, args);
|
||||
window.scrollTo({
|
||||
top: args.y,
|
||||
left: args.x,
|
||||
|
@ -92,10 +91,8 @@ ipcRenderer.on('scrollMessage', (event, args) => {
|
|||
});
|
||||
|
||||
ipcRenderer.on('clickMessage', (event, args) => {
|
||||
console.log('Recieved click message from host', event, args);
|
||||
const elem = document.querySelector(args.cssPath);
|
||||
if (!elem) {
|
||||
console.log('Element to click is not found', args);
|
||||
return;
|
||||
}
|
||||
window.responsivelyApp.lastClickElement = elem;
|
||||
|
@ -107,7 +104,6 @@ ipcRenderer.on('clickMessage', (event, args) => {
|
|||
});
|
||||
|
||||
ipcRenderer.on('scrollDownMessage', (event, args) => {
|
||||
console.log('Recieved click message from host', event, args);
|
||||
window.scrollTo({
|
||||
top: window.scrollY + 250,
|
||||
left: window.scrollX + 250,
|
||||
|
@ -116,7 +112,6 @@ ipcRenderer.on('scrollDownMessage', (event, args) => {
|
|||
});
|
||||
|
||||
ipcRenderer.on('scrollUpMessage', (event, args) => {
|
||||
console.log('Recieved click message from host', event, args);
|
||||
window.scrollTo({
|
||||
top: window.scrollY - 250,
|
||||
left: window.scrollX - 250,
|
||||
|
@ -125,13 +120,13 @@ ipcRenderer.on('scrollUpMessage', (event, args) => {
|
|||
});
|
||||
|
||||
ipcRenderer.on('enableInspectorMessage', (event, args) => {
|
||||
console.log('Recieved enableInpector message from host', event, args);
|
||||
responsivelyApp.domInspector = new responsivelyApp.DomInspector();
|
||||
window.responsivelyApp.domInspector.enable();
|
||||
window.responsivelyApp.domInspectorEnabled = true;
|
||||
});
|
||||
|
||||
ipcRenderer.on('disableInspectorMessage', (event, args) => {
|
||||
console.log('Recieved disableInspector message from host', event, args);
|
||||
window.responsivelyApp.domInspector.disable();
|
||||
window.responsivelyApp.domInspector.destroy();
|
||||
window.responsivelyApp.domInspector = null;
|
||||
window.responsivelyApp.domInspectorEnabled = false;
|
||||
});
|
||||
|
|
|
@ -88,7 +88,7 @@ export default function counter(
|
|||
devices: _getActiveDevices(),
|
||||
homepage: getHomepage(),
|
||||
address: getHomepage(),
|
||||
zoomLevel: 0.5,
|
||||
zoomLevel: 0.6,
|
||||
previousZoomLevel: null,
|
||||
scrollPosition: {x: 0, y: 0},
|
||||
navigatorStatus: {backEnabled: false, forwardEnabled: false},
|
||||
|
|
Loading…
Reference in a new issue