Skip to content
This repository
Browse code

Fix re-rendering of border-image after it has been destroyed

  • Loading branch information...
commit ab2a6d39b36ac3f0d4c1b4561368ac1f1ab80f27 1 parent ae84ccc
Jason Johnston authored

Showing 1 changed file with 7 additions and 4 deletions. Show diff stats Hide diff stats

  1. +7 4 sources/BorderImageRenderer.js
11 sources/BorderImageRenderer.js
@@ -12,7 +12,9 @@ PIE.BorderImageRenderer = PIE.RendererBase.newRenderer( {
12 12
13 13 needsUpdate: function() {
14 14 var si = this.styleInfos;
15   - return si.borderImageInfo.changed() || si.borderImageInfo.changed();
  15 + var tmp = si.borderImageInfo.changed();
  16 + console.log(tmp);
  17 + return tmp;
16 18 },
17 19
18 20 isActive: function() {
@@ -89,12 +91,13 @@ PIE.BorderImageRenderer = PIE.RendererBase.newRenderer( {
89 91 },
90 92
91 93 getBox: function() {
92   - var box = this._box, s, piece, i,
  94 + var box = this.parent.getLayer( this.boxZIndex ),
  95 + s, piece, i,
93 96 pieceNames = this.pieceNames,
94 97 len = pieceNames.length;
95 98
96 99 if( !box ) {
97   - box = this._box = doc.createElement( 'border-image' );
  100 + box = doc.createElement( 'border-image' );
98 101 s = box.style;
99 102 s.position = 'absolute';
100 103
@@ -113,7 +116,7 @@ PIE.BorderImageRenderer = PIE.RendererBase.newRenderer( {
113 116 box.appendChild( piece );
114 117 }
115 118
116   - this.parent.addLayer( this.boxZIndex, box )
  119 + this.parent.addLayer( this.boxZIndex, box );
117 120 }
118 121
119 122 return box;

0 comments on commit ab2a6d3

Please sign in to comment.
Something went wrong with that request. Please try again.