Skip to content

Commit

Permalink
Merge pull request #1187 from finos/datagrid-overdraw
Browse files Browse the repository at this point in the history
Datagrid overdraw fix
  • Loading branch information
texodus authored Sep 8, 2020
2 parents a580384 + 341b506 commit 582d88e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/perspective-viewer-datagrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"dependencies": {
"@finos/perspective": "^0.5.2",
"@finos/perspective-viewer": "^0.5.2",
"regular-table": "=0.1.2"
"regular-table": "=0.1.3"
},
"devDependencies": {
"@finos/perspective-test": "^0.5.2",
Expand Down
21 changes: 11 additions & 10 deletions packages/perspective-viewer-datagrid/src/js/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,18 @@ const datagridPlugin = lock(async function(regular, viewer, view) {
await createModel(regular, table, view, model);
}

if (!model._preserve_focus_state) {
regular.scrollTop = 0;
regular.scrollLeft = 0;
deselect(regular, viewer);
regular._resetAutoSize();
} else {
model._preserve_focus_state = false;
}

try {
await regular.draw({swap: true});
const draw = regular.draw({swap: true});
if (!model._preserve_focus_state) {
regular.scrollTop = 0;
regular.scrollLeft = 0;
deselect(regular, viewer);
regular._resetAutoSize();
} else {
model._preserve_focus_state = false;
}

await draw;
} catch (e) {
console.error(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ td:focus {
outline: #666;
outline-style: dotted;
outline-width: 1px;
}

perspective-viewer.dragging regular-table {
pointer-events: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"superstore_shows_a_grid_without_any_settings_applied_": "7e269a544b300a204b82806f32bef31b",
"superstore_pivots_by_a_row_": "45732744b55570c0d6ae259995314993",
"superstore_pivots_by_two_rows_": "9299f948162b52456632c15e5557f0ad",
"superstore_pivots_by_a_column_": "16428aad191cd57d298dd16792acecd8",
"superstore_pivots_by_a_row_and_a_column_": "0f83cf1e9aaf52e844cca53dca916aca",
"superstore_pivots_by_two_rows_and_two_columns_": "c3bd79f2b0226a859528fdc12f3ca7f2",
"superstore_sorts_by_a_hidden_column_": "db8f68509cf1bcf0c10e95b1a08471e0",
"superstore_pivots_by_a_column_": "8f064a78e0b77f505632df053317a806",
"superstore_pivots_by_a_row_and_a_column_": "c3cd66b434ae463f556fd3ab429d4f2a",
"superstore_pivots_by_two_rows_and_two_columns_": "ddbfbcb81e6fda2fbba7405f5ab00443",
"superstore_sorts_by_a_hidden_column_": "910bdbc2579b1e8f24282356fae5d317",
"superstore_sorts_by_a_numeric_column_": "880ea680df9bc48415450553735c2a6c",
"superstore_filters_by_a_numeric_column_": "45d824114c57a56b990fe637f5514330",
"superstore_filters_by_a_datetime_column_": "4ebf21eead875f46e1470714ef79ba3d",
"superstore_highlights_invalid_filter_": "452e3d6d1fb9fcb18bfc6a3b6ef021ff",
"superstore_sorts_by_an_alpha_column_": "7d4a5cde8d795e020eec5e27763eacbd",
"superstore_displays_visible_columns_": "99025a1343a80e95a75f01b3d45b5a31",
"superstore_resets_viewable_area_when_the_logical_size_expands_": "8ee16c0af95c89d7cbd3987d454a3dfd",
"superstore_displays_visible_columns_": "91b906e38d0e3115c929cfa5e15cb5fb",
"superstore_resets_viewable_area_when_the_logical_size_expands_": "e0dcc4db517a7ff5471f27301aaceb29",
"superstore_resets_viewable_area_when_the_physical_size_expands_": "7e269a544b300a204b82806f32bef31b",
"__GIT_COMMIT__": "149e29ceb2f1542785b1328248048b2d1de298cb"
"__GIT_COMMIT__": "8256bc9394fe07d15b2d7856f8f94630c1df6a87"
}
3 changes: 3 additions & 0 deletions packages/perspective-viewer/src/themes/material.dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ perspective-viewer, .perspective-viewer-material-dark {
.psp-header-border {
border-right: 1px solid #999;
}
.psp-header-border:last-child {
border-right-width: 0px;
}

.psp-tree-label:before {
color: #999;
Expand Down
14 changes: 7 additions & 7 deletions packages/perspective-workspace/test/results/linux.docker.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"index_restore_workspace_with_detail_only": "b4707075b304f6aae823e30fc39a46d8",
"index_restore_workspace_with_master_only": "9542d628f04cd89eabb1de2f346b4dd9",
"index_restore_workspace_with_master_and_detail": "dfb034e51fe36b06e00bc90da140600a",
"__GIT_COMMIT__": "149e29ceb2f1542785b1328248048b2d1de298cb",
"index_restore_workspace_with_master_only": "99c6ae3afee89e5ffd7e912e1ce037ac",
"index_restore_workspace_with_master_and_detail": "000fea0e72a919a3a67ba44f76cb352b",
"__GIT_COMMIT__": "9e7b43b49c396387991d896adf415265b4489cc9",
"index_HTML_Create_One": "ef6c0b0cee3186584b17e3a86a5bdcf4",
"index_HTML_Create_Multiple": "403c96829b89027a913430c699a27e51",
"index_HTML_Create_multiple_with_names": "92d37a6fb3e606bd3ffad77f1fc2d801",
Expand All @@ -11,8 +11,8 @@
"index_appendChild_Create_multiple": "2a28e407f22cd843986f872b4268198b",
"index_appendChild_With_name": "b4707075b304f6aae823e30fc39a46d8",
"index_appendChild_Without_slot": "ef6c0b0cee3186584b17e3a86a5bdcf4",
"index_restore_workspace_with_viewers_with_generated_slotids": "01600335e464a4080e2215fb2f56beae",
"index_restore_workspace_in_linked_mode": "591a61cc194e66b71e5dfaef62325094",
"index_selection_is_disabled_if_no_linked_viewers": "e0851bc64139c5c3dd8cb424e74baf9d",
"index_selection_is_disabled_if_grid_has_no_row-pivots": "0a91a427603a348101cc932c52127b03"
"index_restore_workspace_with_viewers_with_generated_slotids": "96f315e8d0079adee54c1c28c71c0b3b",
"index_restore_workspace_in_linked_mode": "8d7c7de491def765dcd3a36209a3ce0b",
"index_selection_is_disabled_if_no_linked_viewers": "382f918ad997165388e15621f82f0185",
"index_selection_is_disabled_if_grid_has_no_row-pivots": "ae23ac4aa48e5ae52df9111968b5d4fc"
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12632,10 +12632,10 @@ regjsparser@^0.6.0:
dependencies:
jsesc "~0.5.0"

regular-table@=0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/regular-table/-/regular-table-0.1.2.tgz#75c56bc8c0eaea39a07becd168f5fc1e35fd6653"
integrity sha512-+P2veAk6TmDkY1d6ssBDm+K9XZna9KHrlq8r6ZxEV1+tZ2Xy7nWq8ySTOu++tyKEWMOyR0e2HfmKbSPFxdHPBw==
regular-table@=0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/regular-table/-/regular-table-0.1.3.tgz#27fc0f54f9ac8682c8fcaf982689cc1e9efbe44e"
integrity sha512-41PadI6lCijE/371w1v3V7bm4bMZzHC0fG2hZBi+SRkTXPneCll6a4+kNXDxsgbPX8ahiBbcXtm/ASEavxHaPQ==

relateurl@0.2.x:
version "0.2.7"
Expand Down

0 comments on commit 582d88e

Please sign in to comment.