mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Show line number of tag in live css panel
This commit is contained in:
parent
c9e7fe2546
commit
1f480dd3b8
3 changed files with 2 additions and 2 deletions
Binary file not shown.
|
|
@ -336,7 +336,7 @@ class PreviewIntegration
|
|||
while target and target.ownerDocument
|
||||
css = get_matched_css(target, is_ancestor, all_properties)
|
||||
if css.length > 0
|
||||
ans['nodes'].push({'name':target.tagName?.toLowerCase(), 'css':css, 'is_ancestor':is_ancestor})
|
||||
ans['nodes'].push({'name':target.tagName?.toLowerCase(), 'css':css, 'is_ancestor':is_ancestor, 'sourceline':target.getAttribute('data-lnum')})
|
||||
target = target.parentNode
|
||||
is_ancestor = true
|
||||
return JSON.stringify(ans)
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ def show_data(self, data):
|
|||
w.deleteLater()
|
||||
self.widgets = []
|
||||
for node in data['nodes']:
|
||||
node_name = node['name']
|
||||
node_name = node['name'] + ' @%s' % node['sourceline']
|
||||
if node['is_ancestor']:
|
||||
title = _('Inherited from %s') % node_name
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue