forked from rrweb-io/rrweb
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rrweb): clean up pointer tap circles when seeking by breadcrumb (#…
…209) - fixes getsentry/sentry#72959 - cleans up the tap circles when the user seeks by breadcrumb (aka when `isSync` is true) so that there aren't a bunch left on the screen at once - verified that with this change, multitouch still works correctly before: https://github.com/getsentry/rrweb/assets/56095982/6ab6b903-1bb3-494d-8f6e-9e27cf97f199 after (video also shows playback working normally): https://github.com/getsentry/rrweb/assets/56095982/610fe5e5-1615-4eb5-8837-4ac5e4df1a05
- Loading branch information
1 parent
0e75cb4
commit dbc62a2
Showing
3 changed files
with
231 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
import { | ||
EventType, | ||
IncrementalSource, | ||
MouseInteractions, | ||
} from '@sentry-internal/rrweb-types'; | ||
import type { eventWithTime } from '../../../types/src'; | ||
|
||
const events: eventWithTime[] = [ | ||
{ | ||
type: 4, | ||
data: { | ||
href: '', | ||
width: 1600, | ||
height: 900, | ||
}, | ||
timestamp: 0, | ||
}, | ||
{ | ||
type: 2, | ||
data: { | ||
node: { | ||
type: 0, | ||
childNodes: [ | ||
{ type: 1, name: 'html', publicId: '', systemId: '', id: 2 }, | ||
{ | ||
type: 2, | ||
tagName: 'html', | ||
attributes: { lang: 'en' }, | ||
childNodes: [ | ||
{ | ||
type: 2, | ||
tagName: 'head', | ||
attributes: {}, | ||
childNodes: [ | ||
{ | ||
id: 101, | ||
type: 2, | ||
tagName: 'style', | ||
attributes: {}, | ||
childNodes: [ | ||
{ | ||
id: 102, | ||
type: 3, | ||
isStyle: true, | ||
textContent: 'div:hover { background-color: gold; }', | ||
}, | ||
], | ||
}, | ||
], | ||
id: 4, | ||
}, | ||
{ type: 3, textContent: '\n ', id: 13 }, | ||
{ | ||
type: 2, | ||
tagName: 'body', | ||
attributes: {}, | ||
childNodes: [ | ||
{ type: 3, textContent: '\n ', id: 15 }, | ||
{ | ||
type: 2, | ||
tagName: 'div', | ||
attributes: { | ||
style: | ||
'border: 1px solid #000000; width: 100px; height: 100px;', | ||
}, | ||
childNodes: [{ type: 3, textContent: '\n ', id: 17 }], | ||
id: 16, | ||
}, | ||
], | ||
id: 14, | ||
}, | ||
], | ||
id: 3, | ||
}, | ||
], | ||
id: 1, | ||
}, | ||
initialOffset: { left: 0, top: 0 }, | ||
}, | ||
timestamp: 10, | ||
}, | ||
{ | ||
type: 3, | ||
data: { | ||
source: IncrementalSource.MouseInteraction, | ||
type: MouseInteractions.TouchStart, | ||
id: 16, | ||
x: 30, | ||
y: 30, | ||
pointerId: 0, | ||
}, | ||
timestamp: 100, | ||
}, | ||
{ | ||
type: 3, | ||
data: { | ||
source: IncrementalSource.TouchMove, | ||
positions: [ | ||
{ | ||
id: 0, | ||
x: 149.436, | ||
y: 433.929, | ||
timeOffset: 30, | ||
}, | ||
{ | ||
id: 1, | ||
x: 243.436, | ||
y: 155.929, | ||
timeOffset: 0, | ||
}, | ||
], | ||
pointerId: 0, | ||
}, | ||
timestamp: 150, | ||
}, | ||
{ | ||
type: 3, | ||
data: { | ||
source: IncrementalSource.MouseInteraction, | ||
type: MouseInteractions.TouchEnd, | ||
id: 16, | ||
x: 30, | ||
y: 30, | ||
pointerId: 0, | ||
}, | ||
timestamp: 155, | ||
}, | ||
{ | ||
type: 3, | ||
data: { | ||
source: IncrementalSource.MouseInteraction, | ||
type: MouseInteractions.TouchStart, | ||
id: 16, | ||
x: 30, | ||
y: 30, | ||
pointerId: 1, | ||
}, | ||
timestamp: 160, | ||
}, | ||
{ | ||
type: 3, | ||
data: { | ||
source: IncrementalSource.TouchMove, | ||
positions: [ | ||
{ | ||
id: 0, | ||
x: 149.436, | ||
y: 433.929, | ||
timeOffset: 30, | ||
}, | ||
{ | ||
id: 1, | ||
x: 243.436, | ||
y: 155.929, | ||
timeOffset: 0, | ||
}, | ||
], | ||
pointerId: 1, | ||
}, | ||
timestamp: 170, | ||
}, | ||
{ | ||
type: 3, | ||
data: { | ||
source: IncrementalSource.MouseInteraction, | ||
type: MouseInteractions.TouchEnd, | ||
id: 16, | ||
x: 30, | ||
y: 30, | ||
pointerId: 1, | ||
}, | ||
timestamp: 180, | ||
}, | ||
{ | ||
type: EventType.IncrementalSnapshot, | ||
data: { source: IncrementalSource.Scroll, id: 1, x: 0, y: 250 }, | ||
timestamp: 220, | ||
}, | ||
]; | ||
|
||
export default events; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters