Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 7d810146ed97b38a986d3b9d19870e4d839439cd
- Author: Jason Laster <jason.laster.11@gmail.com>
- Date: Mon Aug 20 16:54:00 2018 -0400
- ...
- diff --git a/assets/images/Svg.js b/assets/images/Svg.js
- index de1c776..51cc8ad 100644
- --- a/assets/images/Svg.js
- +++ b/assets/images/Svg.js
- @@ -26,6 +26,7 @@ const svg = {
- folder: require("./folder.svg"),
- globe: require("./globe.svg"),
- home: require("./home.svg"),
- + information: require("./information.svg"),
- javascript: require("./javascript.svg"),
- jquery: require("./jquery.svg"),
- underscore: require("./underscore.svg"),
- diff --git a/src/components/SecondaryPanes/Scopes.js b/src/components/SecondaryPanes/Scopes.js
- index fa83f61..6cc737b 100644
- --- a/src/components/SecondaryPanes/Scopes.js
- +++ b/src/components/SecondaryPanes/Scopes.js
- @@ -22,6 +22,7 @@ import { ObjectInspector } from "devtools-reps";
- import type { Pause, Why } from "../../types";
- import type { NamedValue } from "../../utils/pause/scopes/types";
- +import Svg from "../shared/Svg";
- import "./Scopes.css";
- type Props = {
- @@ -126,6 +127,19 @@ class Scopes extends PureComponent<Props, State> {
- : L10N.getStr("scopes.toggleToOriginal")}
- </a>
- </div>
- +
- + <div className="scope-type-toggle">
- + <a
- + href=""
- + onClick={e => {
- + e.preventDefault();
- + this.setState({ showOriginal: !showOriginal });
- + }}
- + >
- + <Svg name="information" title="..." aria-label="..." />
- + Source Maps
- + </a>
- + </div>
- ) : null}
- </div>
- );
- diff --git a/src/components/shared/Svg.css b/src/components/shared/Svg.css
- index 15d2801..d8bce15 100644
- --- a/src/components/shared/Svg.css
- +++ b/src/components/shared/Svg.css
- @@ -37,7 +37,8 @@
- .worker svg,
- .refresh svg,
- .shortcut svg,
- -.add-button svg {
- +.add-button svg,
- +.information svg {
- width: 15px;
- }
- diff --git a/src/reducers/pause.js b/src/reducers/pause.js
- index 502ab39..3f748b1 100644
- --- a/src/reducers/pause.js
- +++ b/src/reducers/pause.js
- @@ -54,7 +54,8 @@ export type PauseState = {
- [FrameId]: {
- [string]: string | null
- }
- - }
- + },
- + mappingsType: "column" | "line" | null
- },
- selectedFrameId: ?string,
- selectedComponentIndex: ?number,
- @@ -86,7 +87,8 @@ const emptyPauseState = {
- frameScopes: {
- generated: {},
- original: {},
- - mappings: {}
- + mappings: {},
- + mappingsType: null
- },
- selectedFrameId: null,
- loadedObjects: {},
- @@ -168,12 +170,14 @@ function update(
- ...state.frameScopes.mappings,
- [selectedFrameId]: value && value.mappings
- };
- +
- return {
- ...state,
- frameScopes: {
- ...state.frameScopes,
- original,
- - mappings
- + mappings,
- + mappingsType: "column"
- }
- };
- }
- diff --git a/src/utils/pause/mapScopes/index.js b/src/utils/pause/mapScopes/index.js
- index 1f6fa97..158f4c0 100644
- --- a/src/utils/pause/mapScopes/index.js
- +++ b/src/utils/pause/mapScopes/index.js
- @@ -73,7 +73,7 @@ export async function buildMappedScopes(
- );
- if (originalRanges.every(range => range.columnEnd === Infinity)) {
- - return null;
- + return { mappingsType: "line" };
- }
- const generatedAstBindings = buildGeneratedBindingList(
Add Comment
Please, Sign In to add comment