Skip to content

Commit 444db96

Browse files
Disable draggable on images
1 parent 72acbbf commit 444db96

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/AssistantView.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class AssistantView extends React.Component<Props, State> implements SessionCont
8484
getWatermarkView(): any {
8585
return <a style={styles.watermark} href='https://www.superluminal.dev' target='_blank'>
8686
<span style={{ opacity: 0.4, fontSize: '11px' }}>Powered by</span>
87-
<img src={LogoText} height="14px" style={{ opacity: 0.4, marginTop: '1px' }} />
87+
<img src={LogoText} height="14px" style={{ opacity: 0.4, marginTop: '1px' }} draggable={false} />
8888
</a>
8989
}
9090

@@ -109,7 +109,7 @@ class AssistantView extends React.Component<Props, State> implements SessionCont
109109
case 'assistant':
110110
if ('text' in message.content) {
111111
return <div key={message.id} style={styles.messageContainer}>
112-
<img src={LogoInverted} style={styles.profilePictureView} width="24px" height="24px" />
112+
<img src={LogoInverted} style={styles.profilePictureView} width="24px" height="24px" draggable={false} />
113113
<div style={{ ...styles.assistantMessage, ...assistantMessageStyle }}>{message.content.text}</div>
114114
</div>
115115
} else if ('plot' in message.content) {
@@ -120,7 +120,7 @@ class AssistantView extends React.Component<Props, State> implements SessionCont
120120
const height = ((plot.layout.width * width) / plot.layout.height);
121121
const layout = { ...plot.layout, width, height, margin: { t: 30, b: 10, l: 10, r: 10, pad: 0 } };
122122
return <div key={message.id} style={styles.messageContainer}>
123-
<img src={LogoInverted} style={styles.profilePictureView} width="24px" height="24px" />
123+
<img src={LogoInverted} style={styles.profilePictureView} width="24px" height="24px" draggable={false} />
124124
<div style={{ display: 'flex', flexDirection: 'column', rowGap: '12px' }}>
125125
<div style={{ ...styles.assistantMessage, ...{ maxWidth: '100%', background: '#FFFFFF' }, ...assistantMessageStyle }}>
126126
<Plot data={plot.data} layout={layout} config={{ toImageButtonOptions: { scale: 3 } }} />
@@ -131,8 +131,8 @@ class AssistantView extends React.Component<Props, State> implements SessionCont
131131
const table = message.content.table;
132132
return <div key={message.id} style={styles.messageContainer}>
133133
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end' }}>
134-
<img src={LogoInverted} style={styles.profilePictureView} width="24px" height="24px" />
135-
<img src={IconExpand} width="20px" height="20px" onClick={() => this.expandTable(table)} />
134+
<img src={LogoInverted} style={styles.profilePictureView} width="24px" height="24px" draggable={false} />
135+
<img src={IconExpand} width="20px" height="20px" onClick={() => this.expandTable(table)} draggable={false} />
136136
</div>
137137
<div style={{ ...styles.assistantMessage, ...{ maxWidth: '100%', background: '#FFFFFF' }, ...assistantMessageStyle }}>
138138
<TablePreview table={table} />
@@ -155,7 +155,7 @@ class AssistantView extends React.Component<Props, State> implements SessionCont
155155
</div>
156156
} else {
157157
return <div style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
158-
<img src='https://superluminal.dev/images/ai_new.gif' width="56px" height="56px" />
158+
<img src='https://superluminal.dev/images/ai_new.gif' width="56px" height="56px" draggable={false} />
159159
<div style={{ fontSize: '20px', fontWeight: 600, color: '#000000', marginTop: '8px' }}>Loading</div>
160160
</div>
161161
}

0 commit comments

Comments
 (0)