Repository navigation
Expand file tree
/
Copy pathsmart-position.html
More file actions
46 lines (44 loc) · 1.91 KB
/
Copy pathsmart-position.html
File metadata and controls
46 lines (44 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<style type="text/css">
#demoSmart {
width: 100px;
height: 100px;
background-image: url('./src/tooltip/images/smartposition.png');
background-size: 100px 100px;
position: absolute;
left: calc( 50% - 50px);
top: calc( 50% - 50px);
}
#targetContainer {
margin-top: 15px;
margin-bottom: 15px;
min-height: 350px;
width: 100%;
padding-left: 0;
padding-right: 0;
float: left;
position: relative;
border: 1px solid #dddddd;
border-radius: 3px;
}
</style>
<!-- Tooltip element -->
<div id="targetContainer" class="col-lg-12 control-section">
<div id="demoSmart">
</div>
</div>
<div id="action-description">
<p>This sample demonstrates the Smart Positioning functionalities of the Tooltip which will open by dragging the picture.
</p>
</div>
<div id="description">
<p>This sample shows the dynamic adjustment of the tooltip position within the specified Viewport. Start dragging the ant
image, so that the tooltip opens up immediately and keeps moving along with the target image. When the image reaches
the corners of the sample container on dragging, the tooltip and its arrow position will be auto adjusted
to make it look fit within the sample container area. </p>
<p>In this sample, the tooltip is opened manually by using its <code>open</code> method on drag start of the target image.
On further dragging, the <code>refresh</code> method of the tooltip needs to be called to reposition it
continuously and on drag stop, the tooltip will be hidden by using it’s <code>close</code> method.</p>
<p>More information on dynamic positioning of the tooltip can be found in the
<a href="http://ej2.syncfusion.com/documentation/tooltip/position.html#dynamic-positioning" target="_blank"> documentation section</a>.
</p>
</div>