more and meaningful tooltips
This commit is contained in:
parent
8ed2a03ea9
commit
7b82ff31dd
@ -7,12 +7,19 @@
|
|||||||
.tooltip span {
|
.tooltip span {
|
||||||
z-index:10;display:none; padding:14px 20px;
|
z-index:10;display:none; padding:14px 20px;
|
||||||
margin-top:-30px; margin-left:28px;
|
margin-top:-30px; margin-left:28px;
|
||||||
width:300px; line-height:16px;
|
width:150px; line-height:16px;
|
||||||
}
|
}
|
||||||
.tooltip:hover span {
|
.tooltip:hover span {
|
||||||
display:inline; position:absolute; color:#111;
|
display:inline; position:absolute; color:#111;
|
||||||
border:1px solid #DCA; background:#fffAF0;}
|
border:1px solid #DCA; background:#fffAF0;
|
||||||
.callout {z-index:20;position:absolute;top:30px;border:0;left:-12px;}
|
}
|
||||||
|
.callout {
|
||||||
|
z-index:20;
|
||||||
|
position:absolute;
|
||||||
|
top:30px;
|
||||||
|
border:0;
|
||||||
|
left:-12px;
|
||||||
|
}
|
||||||
|
|
||||||
/*CSS3 extras*/
|
/*CSS3 extras*/
|
||||||
.tooltip span
|
.tooltip span
|
||||||
@ -28,8 +35,13 @@ $susy: (
|
|||||||
|
|
||||||
.debugger-view { @include container(90%); }
|
.debugger-view { @include container(90%); }
|
||||||
|
|
||||||
.classes { @include span(3); }
|
.classes {
|
||||||
|
@include span(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.one-class {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
.file-view {
|
.file-view {
|
||||||
@include span(4);
|
@include span(4);
|
||||||
margin: span(1);
|
margin: span(1);
|
||||||
|
@ -5,12 +5,28 @@ module Main
|
|||||||
super(*args)
|
super(*args)
|
||||||
|
|
||||||
page._classes!.clear
|
page._classes!.clear
|
||||||
|
all = []
|
||||||
Virtual.machine.space.classes.each do |name , claz|
|
Virtual.machine.space.classes.each do |name , claz|
|
||||||
next if [:Kernel,:Module,:MetaClass,:BinaryCode].index name
|
next if [:Kernel,:Module,:MetaClass,:BinaryCode].index name
|
||||||
|
all << name
|
||||||
|
end
|
||||||
|
all.sort.each do |name|
|
||||||
c = Volt::Model.new :name => name
|
c = Volt::Model.new :name => name
|
||||||
page._classes << c
|
page._classes << c
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def variables(clas_model)
|
||||||
|
self.variables(clas_model.name)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.variables(clas_name)
|
||||||
|
layout = Virtual.machine.space.get_class_by_name(clas_name).object_layout
|
||||||
|
vars = []
|
||||||
|
layout.object_instance_names.each do |name|
|
||||||
|
vars << name
|
||||||
|
end
|
||||||
|
vars
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -23,5 +23,25 @@ module Main
|
|||||||
var.class.name.split("::").last[0,2]
|
var.class.name.split("::").last[0,2]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def variables val
|
||||||
|
name = val.class.name.split("::").last
|
||||||
|
ClassesController.variables(name)
|
||||||
|
end
|
||||||
|
|
||||||
|
def content(id)
|
||||||
|
object = Virtual.machine.objects[id]
|
||||||
|
fields = []
|
||||||
|
if object and ! object.is_a?(String)
|
||||||
|
clazz = object.class.name.split("::").last
|
||||||
|
fields << "#{clazz}:#{object.internal_object_length}"
|
||||||
|
fields << "--------------------"
|
||||||
|
object.get_instance_variables.each do |variable|
|
||||||
|
f = object.get_instance_variable(variable)
|
||||||
|
fields << "#{f.class.name.split('::').last} : #{f.object_id}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fields
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,8 +5,13 @@
|
|||||||
<div class="classes">
|
<div class="classes">
|
||||||
<h4> Classes </h4>
|
<h4> Classes </h4>
|
||||||
{{page._classes.each do |clas| }}
|
{{page._classes.each do |clas| }}
|
||||||
<div class="one-class">
|
<div class="one-class tooltip">
|
||||||
{{ clas._name }}
|
{{ clas._name }}
|
||||||
|
<span>
|
||||||
|
{{clas._name}}<br/>
|
||||||
|
-------------- <br/>
|
||||||
|
{{variables(clas).join("\n") }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,16 +20,13 @@
|
|||||||
<div class="field tooltip">
|
<div class="field tooltip">
|
||||||
{{index}}{{marker(attribute)}}
|
{{index}}{{marker(attribute)}}
|
||||||
<span>
|
<span>
|
||||||
{{attribute.class}}
|
{{variables(attribute).join("\n")}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="value tooltip">
|
<div class="value tooltip">
|
||||||
{{attribute.object_id}}
|
{{attribute.object_id}}
|
||||||
<span>
|
<span>
|
||||||
long text with initlong text with initlong <br/>
|
{{content(attribute.object_id).join("\n")}}
|
||||||
text with initlong text with initlong
|
|
||||||
<h3>text with initlong </h3>
|
|
||||||
text with initlong text with init
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user