fixed controls broken by incremental rendering

pull/2/head
gorhill 10 years ago
parent f8c38177e2
commit 4142551c13

@ -146,17 +146,19 @@ var matrixSnapshot = function(pageStore, details) {
domain: pageStore.pageDomain,
headers: µm.Matrix.getColumnHeaders(),
hostname: pageStore.pageHostname,
mtxColorModified: µm.tMatrix.modifiedTime !== details.mtxColorModifiedTime,
mtxContentModified: pageStore.mtxContentModifiedTime !== details.mtxContentModifiedTime,
mtxCountModified: pageStore.mtxCountModifiedTime !== details.mtxCountModifiedTime,
mtxColorModifiedTime: µm.tMatrix.modifiedTime,
mtxContentModifiedTime: pageStore.mtxContentModifiedTime,
mtxCountModifiedTime: pageStore.mtxCountModifiedTime,
pMatrixModified: µm.pMatrix.modifiedTime !== details.pMatrixModifiedTime,
pMatrixModifiedTime: µm.pMatrix.modifiedTime,
pSwitches: {},
rows: {},
rowCount: 0,
scope: '*',
tabId: pageStore.tabId,
tMatrixModified: µm.tMatrix.modifiedTime !== details.tMatrixModifiedTime,
tMatrixModifiedTime: µm.tMatrix.modifiedTime,
tSwitches: {},
url: pageStore.pageUrl,
userSettings: {
@ -264,7 +266,8 @@ var matrixSnapshotFromTabId = function(details, callback) {
// First verify whether we must return data or not.
if (
µm.tMatrix.modifiedTime === details.mtxColorModifiedTime &&
µm.tMatrix.modifiedTime === details.tMatrixModifiedTime &&
µm.pMatrix.modifiedTime === details.pMatrixModifiedTime &&
pageStore.mtxContentModifiedTime === details.mtxContentModifiedTime &&
pageStore.mtxCountModifiedTime === details.mtxCountModifiedTime
) {

@ -973,18 +973,21 @@ function initMenuEnvironment() {
function selectGlobalScope() {
setUserSetting('popupScopeLevel', '*');
matrixSnapshot.tMatrixModifiedTime = undefined;
updateMatrixSnapshot();
dropDownMenuHide();
}
function selectDomainScope() {
setUserSetting('popupScopeLevel', 'domain');
matrixSnapshot.tMatrixModifiedTime = undefined;
updateMatrixSnapshot();
dropDownMenuHide();
}
function selectSiteScope() {
setUserSetting('popupScopeLevel', 'site');
matrixSnapshot.tMatrixModifiedTime = undefined;
updateMatrixSnapshot();
dropDownMenuHide();
}
@ -1196,7 +1199,8 @@ var matrixSnapshotPoller = (function() {
if (
response.mtxContentModified === false &&
response.mtxCountModified === false &&
response.mtxColorModified === false
response.pMatrixModified === false &&
response.tMatrixModified === false
) {
return;
}
@ -1208,7 +1212,11 @@ var matrixSnapshotPoller = (function() {
if ( response.mtxCountModified ) {
updateMatrixCounts();
}
if ( response.mtxColorModified ) {
if (
response.pMatrixModified ||
response.tMatrixModified ||
response.scopeModified
) {
updateMatrixColors();
updateMatrixBehavior();
updateMatrixButtons();
@ -1225,9 +1233,11 @@ var matrixSnapshotPoller = (function() {
messager.send({
what: 'matrixSnapshot',
tabId: matrixSnapshot.tabId,
mtxColorModifiedTime: matrixSnapshot.mtxColorModifiedTime,
mtxContentModifiedTime: matrixSnapshot.mtxContentModifiedTime,
mtxCountModifiedTime: matrixSnapshot.mtxCountModifiedTime
mtxCountModifiedTime: matrixSnapshot.mtxCountModifiedTime,
mtxDiffCount: matrixSnapshot.diff.length,
pMatrixModifiedTime: matrixSnapshot.pMatrixModifiedTime,
tMatrixModifiedTime: matrixSnapshot.tMatrixModifiedTime,
}, onPolled);
};

Loading…
Cancel
Save