Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
98d30b38
Коммит
98d30b38
создал
Сен 09, 2019
по автору
Illya Klymov
Просмотр файлов
Explicitly import spriteIcon helper
владелец
c15be006
Изменения
2
Скрыть пробелы
Построчно
Рядом
app/assets/javascripts/image_diff/helpers/badge_helper.js
Просмотр файла @
98d30b38
import
{
spriteIcon
}
from
'
~/lib/utils/common_utils
'
;
export
function
createImageBadge
(
noteId
,
{
x
,
y
},
classNames
=
[])
{
const
buttonEl
=
document
.
createElement
(
'
button
'
);
const
classList
=
classNames
.
concat
([
'
js-image-badge
'
]);
...
...
@@ -20,7 +22,7 @@ export function addImageBadge(containerEl, { coordinate, badgeText, noteId }) {
export
function
addImageCommentBadge
(
containerEl
,
{
coordinate
,
noteId
})
{
const
buttonEl
=
createImageBadge
(
noteId
,
coordinate
,
[
'
image-comment-badge
'
]);
buttonEl
.
innerHTML
=
gl
.
utils
.
spriteIcon
(
'
image-comment-dark
'
);
buttonEl
.
innerHTML
=
spriteIcon
(
'
image-comment-dark
'
);
containerEl
.
appendChild
(
buttonEl
);
}
...
...
app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
Просмотр файла @
98d30b38
import
{
spriteIcon
}
from
'
~/lib/utils/common_utils
'
;
export
function
addCommentIndicator
(
containerEl
,
{
x
,
y
})
{
const
buttonEl
=
document
.
createElement
(
'
button
'
);
buttonEl
.
classList
.
add
(
'
btn-transparent
'
);
...
...
@@ -6,7 +8,7 @@ export function addCommentIndicator(containerEl, { x, y }) {
buttonEl
.
style
.
left
=
`
${
x
}
px`
;
buttonEl
.
style
.
top
=
`
${
y
}
px`
;
buttonEl
.
innerHTML
=
gl
.
utils
.
spriteIcon
(
'
image-comment-dark
'
);
buttonEl
.
innerHTML
=
spriteIcon
(
'
image-comment-dark
'
);
containerEl
.
appendChild
(
buttonEl
);
}
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать