Skip to content

Commit

Permalink
deleted old links implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
aazaliyaa committed Oct 3, 2024
1 parent 49d8130 commit d963ae7
Showing 1 changed file with 1 addition and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import styles from './link-annotation.module.scss';
export const LinkAnnotation = ({
pointStart,
pointFinish,
category,
linkType,
onDeleteLink,
onLinkSelect,
Expand All @@ -32,13 +31,6 @@ export const LinkAnnotation = ({
transformOrigin: 'left'
};

const getStyleFromLink = useMemo(() => {
return {
...getStyledLinkByBounds(pointStart, pointFinish),
...commonStyles
};
}, [pointStart, pointFinish]);

const getStyleFromLink1 = useMemo(() => {
return {
...getStyledLinkByBounds(
Expand Down Expand Up @@ -83,7 +75,7 @@ export const LinkAnnotation = ({
};
}, [pointStart, pointFinish, xBound]);

const NewLink = (
return (
<>
<div
style={getStyleFromLink1 as CSSProperties}
Expand Down Expand Up @@ -134,39 +126,4 @@ export const LinkAnnotation = ({
</div>
</>
);

const OldLink = (
<div
style={getStyleFromLink as CSSProperties}
className={styles.link}
onClick={onLinkSelect}
role="none"
>
<div className={styles.container} style={{ color: category.metadata?.color }}>
<div
className={`${styles.arrow} ${styles.arrowBottom}`}
style={{ visibility: !reversed ? 'hidden' : undefined }}
>
<ArrowIcon />
</div>
<div className={styles.label}>
<IconButton
icon={closeIcon}
onClick={onDeleteLink}
color={category.metadata?.color as EpamColor}
iconPosition={'right'}
/>
</div>
<div
className={styles.arrow}
style={{ visibility: reversed ? 'hidden' : undefined }}
>
<ArrowIcon />
</div>
</div>
</div>
);

return NewLink;
// OldLink
};

0 comments on commit d963ae7

Please sign in to comment.