Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. diff --git a/devtools/client/debugger/new/src/components/Editor/ColumnBreakpoint.js b/devtools/client/debugger/new/src/components/Editor/ColumnBreakpoint.js
  2. index 7a38da3fb2d4..7451f98fe7c0 100644
  3. --- a/devtools/client/debugger/new/src/components/Editor/ColumnBreakpoint.js
  4. +++ b/devtools/client/debugger/new/src/components/Editor/ColumnBreakpoint.js
  5. @@ -74,7 +74,7 @@ export default class ColumnBreakpoint extends PureComponent<Props> {
  6. onContextMenu: this.onContextMenu
  7. });
  8.  
  9. - this.bookmark = doc.setBookmark({ line: line - 1, ch: column }, { widget });
  10. + this.bookmark = doc.setBookmark({ line: line - 1, ch: column }, { widget, handleMouseEvents: false });
  11. };
  12.  
  13. clearColumnBreakpoint = () => {
  14. @@ -119,6 +119,7 @@ export default class ColumnBreakpoint extends PureComponent<Props> {
  15. }
  16.  
  17. componentDidUpdate() {
  18. + console.log(`CB CDU`)
  19. this.clearColumnBreakpoint();
  20. this.addColumnBreakpoint();
  21. }
  22. diff --git a/devtools/client/debugger/new/src/reducers/breakpoints.js b/devtools/client/debugger/new/src/reducers/breakpoints.js
  23. index 3b3c38fa1adb..dd36f29d8fe3 100644
  24. --- a/devtools/client/debugger/new/src/reducers/breakpoints.js
  25. +++ b/devtools/client/debugger/new/src/reducers/breakpoints.js
  26. @@ -8,7 +8,7 @@
  27. * Breakpoints reducer
  28. * @module reducers/breakpoints
  29. */
  30. -
  31. +import { createSelector } from "reselect";
  32. import { isGeneratedId, isOriginalId } from "devtools-source-map";
  33. import { isEqual } from "lodash";
  34.  
  35. @@ -288,13 +288,20 @@ function isMatchingLocation(location1, location2) {
  36.  
  37. type OuterState = { breakpoints: BreakpointsState };
  38.  
  39. +const getBreakpointsState = (state: OuterState) => state.breakpoints;
  40. +
  41. export function getBreakpointsMap(state: OuterState): BreakpointsMap {
  42. return state.breakpoints.breakpoints;
  43. }
  44.  
  45. -export function getBreakpointsList(state: OuterState): Breakpoint[] {
  46. - return (Object.values(getBreakpointsMap(state)): any);
  47. -}
  48. +// export function getBreakpointsList(state: OuterState): Breakpoint[] {
  49. +// return (Object.values(getBreakpointsMap(state)): any);
  50. +// }
  51. +
  52. +export const getBreakpointsList: Selector<Breakpoint[]> = createSelector(
  53. + getBreakpointsState,
  54. + breakpoints => Object.values(breakpoints.breakpoints)
  55. +);
  56.  
  57. export function getBreakpointCount(state: OuterState): number {
  58. return getBreakpointsList(state).length;
  59. diff --git a/devtools/client/debugger/new/src/selectors/visibleColumnBreakpoints.js b/devtools/client/debugger/new/src/selectors/visibleColumnBreakpoints.js
  60. index a665e3d8c87f..255e2e9de389 100644
  61. --- a/devtools/client/debugger/new/src/selectors/visibleColumnBreakpoints.js
  62. +++ b/devtools/client/debugger/new/src/selectors/visibleColumnBreakpoints.js
  63. @@ -121,12 +121,13 @@ function formatPositions(
  64. export function getColumnBreakpoints(
  65. positions: ?BreakpointPositions,
  66. breakpoints: ?(Breakpoint[]),
  67. - viewport: Range,
  68. + // viewport: Range,
  69. selectedSource: ?Source
  70. ) {
  71. if (!positions) {
  72. return [];
  73. }
  74. + const viewport = {start: {line: 1, column: 1}, end: {line: 1000000, column: 1000000}}
  75.  
  76. // We only want to show a column breakpoint if several conditions are matched
  77. // - it is the first breakpoint to appear at an the original location
  78. @@ -153,7 +154,7 @@ export const visibleColumnBreakpoints: Selector<
  79. > = createSelector(
  80. getVisibleBreakpointPositions,
  81. getVisibleBreakpoints,
  82. - getViewport,
  83. + // getViewport,
  84. getSelectedSource,
  85. getColumnBreakpoints
  86. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement