mirror of
https://github.com/php/web-pres2.git
synced 2026-03-23 23:12:07 +01:00
Do our own bullet handling, fix slide positioning
This commit is contained in:
16
objects.php
16
objects.php
@@ -1249,6 +1249,7 @@ type=\"application/x-shockwave-flash\" width=$this->iwidth height=$this->iheight
|
||||
|
||||
$style='';
|
||||
$type='';
|
||||
$effect='';
|
||||
$ml = $this->level;
|
||||
|
||||
if(!empty($this->marginleft)) $ml += (float)$this->marginleft;
|
||||
@@ -1261,6 +1262,9 @@ type=\"application/x-shockwave-flash\" width=$this->iwidth height=$this->iheight
|
||||
if(!empty($this->type)) $type = $this->type;
|
||||
else if(!empty($objs[$coid]->type)) $type = $objs[$coid]->type;
|
||||
|
||||
if(!empty($this->effect)) $effect = $this->effect;
|
||||
else if(!empty($objs[$coid]->effect)) $effect = $objs[$coid]->effect;
|
||||
|
||||
if(!empty($this->fontsize)) $style .= "font-size: ".$this->fontsize.';';
|
||||
else if(!empty($objs[$coid]->fontsize)) $style .= "font-size: ".(2*(float)$objs[$coid]->fontsize/3).'em;';
|
||||
|
||||
@@ -1270,9 +1274,8 @@ type=\"application/x-shockwave-flash\" width=$this->iwidth height=$this->iheight
|
||||
if(!empty($this->padding)) $style .= "padding: ".$this->padding.';';
|
||||
else if(!empty($objs[$coid]->padding)) $style .= "padding: ".$objs[$coid]->padding.';';
|
||||
|
||||
if ($this->effect) {
|
||||
// we put the slide info in as an attribute so js can get it
|
||||
echo "<div id='$this->id' effect='$this->effect' style='position:relative;'>";
|
||||
if ($effect) {
|
||||
$eff_str = "id=\"$this->id\" effect=\"$effect\"";
|
||||
}
|
||||
switch($type) {
|
||||
case 'numbered':
|
||||
@@ -1315,12 +1318,9 @@ type=\"application/x-shockwave-flash\" width=$this->iwidth height=$this->iheight
|
||||
break;
|
||||
}
|
||||
|
||||
$style .= 'list-style-type: none; position: relative;';
|
||||
$style .= 'list-style-type: none;';
|
||||
|
||||
echo "<li style=\"$style\">".'<tt>'.$bullet.'</tt> '.markup_text($this->text)."</li>\n";
|
||||
if ($this->effect) {
|
||||
echo "</div>";
|
||||
}
|
||||
echo "<div $eff_str style=\"position: relative;\"><li style=\"$style\">".'<tt>'.$bullet.'</tt> '.markup_text($this->text)."</li></div>\n";
|
||||
}
|
||||
|
||||
function plainhtml() {
|
||||
|
||||
2
slide.js
2
slide.js
@@ -5,7 +5,7 @@ function slide(e,x,y,sp,funcCall,xNow,yNow){
|
||||
else{if(e.sliding)return}
|
||||
xNow=xNow||parseInt(e.left||e.style.left||e.style.pixelLeft||e.offsetLeft);
|
||||
yNow=yNow||parseInt(e.top||e.style.top||e.style.pixelTop||e.offsetTop);
|
||||
distX=Math.abs(xNow-x);
|
||||
distX=Math.abs(xNow-x+10);
|
||||
distY=Math.abs(yNow-y);
|
||||
if(Math.round(xNow)!=x)xNow+=(distX/(11-sp)*sign(xNow,x));
|
||||
if(Math.round(yNow)!=y)yNow+=(distY/(11-sp)*sign(yNow,y));
|
||||
|
||||
Reference in New Issue
Block a user