1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-27 06:38:19 +00:00

Fix Cecily tiddler width for when sidebar hidden

This commit is contained in:
Jermolene 2014-04-12 18:24:39 +01:00
parent ee2cd2056c
commit 4f4b743d9c

View File

@ -84,7 +84,8 @@ Load the current map
CecilyStoryView.prototype.loadMap = function() {
this.map = this.listWidget.wiki.getTiddlerData(this.getMapTiddlerTitle(),{
positions: {},
newTiddlerPosition: {x: 0, y: 0}
newTiddlerPosition: {x: 0, y: 0},
width: 600
});
};
@ -99,6 +100,7 @@ CecilyStoryView.prototype.positionTiddler = function(title,domNode) {
var pos = this.lookupTiddlerInMap(title,domNode),
scale = pos.w/domNode.offsetWidth;
$tw.utils.setStyle(domNode,[
{width: this.map.width + "px"},
{transformOrigin: "0% 0%"},
{transform: "translateX(" + pos.x + "px) translateY(" + pos.y + "px) scale(" + scale + ")"}
]);