mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-28 17:32:44 +08:00
Fixing meta content scroll bar
--HG-- branch : dev
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
var syncResize = function () {
|
||||
var _window = $(window);
|
||||
var containerHeight = shapeTracingContainer.outerHeight();
|
||||
var containerWidth = shapeTracingContainer.outerWidth();
|
||||
var toolbarHeight = shapeTracingToolbar.outerHeight();
|
||||
var resizeHandleHeight = shapeTracingResizeHandle.outerHeight();
|
||||
|
||||
@@ -47,13 +48,30 @@
|
||||
|
||||
var windowHeight = _window.height();
|
||||
var scrollTop = _window.scrollTop();
|
||||
var containerWindowHeight = containerHeight - toolbarHeight - resizeHandleHeight;
|
||||
|
||||
shapeTracingContainer.offset({ top: windowHeight - containerHeight + scrollTop, left: 0 });
|
||||
shapeTracingWindow.height(containerHeight - toolbarHeight - resizeHandleHeight);
|
||||
shapeTracingWindowTree.height(containerHeight - toolbarHeight - resizeHandleHeight);
|
||||
shapeTracingWindowContent.height(containerHeight - toolbarHeight - resizeHandleHeight);
|
||||
shapeTracingWindowContent.width(shapeTracingContainer.outerWidth - shapeTracingWindowTree.outerWidth);
|
||||
shapeTracingWindow.height(containerWindowHeight);
|
||||
shapeTracingWindowTree.height(containerWindowHeight);
|
||||
shapeTracingWindowContent.height(containerWindowHeight);
|
||||
shapeTracingContainer.width('100%');
|
||||
|
||||
syncResizeMeta();
|
||||
};
|
||||
|
||||
// forces the content meta zone's height to enable scrollbar
|
||||
var syncResizeMeta = function () {
|
||||
var containerHeight = shapeTracingContainer.outerHeight();
|
||||
var containerWidth = shapeTracingContainer.outerWidth();
|
||||
var toolbarHeight = shapeTracingToolbar.outerHeight();
|
||||
var resizeHandleHeight = shapeTracingResizeHandle.outerHeight();
|
||||
|
||||
var tabsHeight = $('.shape-tracing-tabs:visible').outerHeight();
|
||||
if (tabsHeight) {
|
||||
var metaContent = $('.shape-tracing-meta-content:visible');
|
||||
padding = parseInt(metaContent.css('padding-bottom') + metaContent.css('padding-top'));
|
||||
metaContent.height(containerHeight - toolbarHeight - resizeHandleHeight - tabsHeight - padding);
|
||||
}
|
||||
};
|
||||
|
||||
// ensure the size/position is correct whenver the container or the browser is resized
|
||||
@@ -246,6 +264,8 @@
|
||||
|
||||
// enable codemirror for the current tab
|
||||
enableCodeMirror(target);
|
||||
|
||||
syncResizeMeta();
|
||||
}
|
||||
|
||||
// select shapes when clicked
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
}
|
||||
<div class="shape-tracing-meta" shape-id-meta="@Model.ShapeId" style="display:none">
|
||||
<ul class="shape-tracing-tabs">
|
||||
<li class="shape selected first"><a href="#">Shape</a></li>
|
||||
<li class="model middle"><a href="#">Model</a></li>
|
||||
<li class="placement middle"><a href="#">Placement</a></li>
|
||||
<li class="template middle"><a href="#">Template</a></li>
|
||||
<li class="html last"><a href="#">HTML</a></li>
|
||||
<li class="shape selected first">Shape</li>
|
||||
<li class="model middle">Model</li>
|
||||
<li class="placement middle">Placement</li>
|
||||
<li class="template middle">Template</li>
|
||||
<li class="html last">HTML</li>
|
||||
</ul>
|
||||
|
||||
<div class="shape-tracing-meta-content">
|
||||
|
||||
Reference in New Issue
Block a user